OSDN Git Service
(root)
/
mypaint-anime
/
master.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afb8fe0
)
app: simplify handling of malformed settings.json
author
Martin Renold
<martinxyz@gmx.ch>
Sun, 10 Jul 2011 19:43:42 +0000
(21:43 +0200)
committer
Martin Renold
<martinxyz@gmx.ch>
Sun, 10 Jul 2011 19:43:42 +0000
(21:43 +0200)
Special case for empty file not needed any more.
https://gna.org/bugs/?18314
gui/application.py
patch
|
blob
|
history
diff --git
a/gui/application.py
b/gui/application.py
index
60eb466
..
108857b
100644
(file)
--- a/
gui/application.py
+++ b/
gui/application.py
@@
-141,10
+141,6
@@
class Application: # singleton
def get_json_config():
settingspath = join(self.confpath, 'settings.json')
jsonstr = open(settingspath).read()
- if not jsonstr.strip():
- # happens when we saved it with no space left on device
- print 'Warning: empty settings.json, using defaults'
- return {}
try:
return helpers.json_loads(jsonstr)
except Exception, e: