mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
fix reading config file in python2
This commit is contained in:
parent
69f9bbdc78
commit
dd61a4f5f4
@ -60,11 +60,11 @@ def createConfigFile():
|
||||
"""
|
||||
configFile = os.path.join(os.path.expanduser('~'), '.wakatime.cfg')
|
||||
try:
|
||||
with open(configFile, 'r', encoding='utf-8') as fh:
|
||||
with open(configFile) as fh:
|
||||
pass
|
||||
except IOError:
|
||||
try:
|
||||
with open(configFile, 'w', encoding='utf-8') as fh:
|
||||
with open(configFile, 'w') as fh:
|
||||
fh.write("[settings]\n")
|
||||
fh.write("debug = false\n")
|
||||
fh.write("hidefilenames = false\n")
|
||||
|
Loading…
Reference in New Issue
Block a user