File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -2,18 +2,15 @@ include .pycheckrc
22include AUTHORS
33include CHANGELOG
44include LICENSE
5- include data/bpython
5+ include data/bpython.png
66include data/bpython.desktop
77include data/bpython.appdata.xml
88include doc/sphinx/source/conf.py
99include doc/sphinx/source/*.rst
1010include doc/sphinx/source/logo.png
11- include sample-config
1211include *.theme
13- include bpython/logo.png
14- include ROADMAP
15- include TODO
1612include bpython/test/*.py
1713include bpython/test/*.theme
1814include bpython/translations/*/LC_MESSAGES/bpython.po
1915include bpython/translations/*/LC_MESSAGES/bpython.mo
16+ include bpython/sample-config
Original file line number Diff line number Diff line change 2323
2424from __future__ import with_statement
2525import code
26- import codecs
2726import errno
2827import inspect
2928import os
29+ import pkgutil
3030import pydoc
3131import requests
3232import shlex
@@ -952,10 +952,8 @@ def edit_config(self):
952952 if not (os .path .isfile (self .config .config_path )):
953953 if self .interact .confirm (_ ("Config file does not exist - create new from default? (y/N)" )):
954954 try :
955+ default_config = pkgutil .get_data ('bpython' , 'sample-config' )
955956 bpython_dir , script_name = os .path .split (__file__ )
956- with open (os .path .join (bpython_dir , "sample-config" )) as f :
957- default_config = f .read ()
958-
959957 containing_dir = os .path .dirname (os .path .abspath (self .config .config_path ))
960958 if not os .path .exists (containing_dir ):
961959 os .makedirs (containing_dir )
You can’t perform that action at this time.
0 commit comments