projects
/
drlaunch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd7428c
)
Fix old-version loading.
author
Stefanos Harhalakis
<v13@v13.gr>
Fri, 16 Jul 2010 14:10:42 +0000
(14:10 +0000)
committer
Stefanos Harhalakis
<v13@v13.gr>
Fri, 16 Jul 2010 14:10:42 +0000
(14:10 +0000)
src/config.py
patch
|
blob
|
history
diff --git
a/src/config.py
b/src/config.py
index
67e111b
..
f58b2ec
100755
(executable)
--- a/
src/config.py
+++ b/
src/config.py
@@
-184,6
+184,15
@@
def load_all():
st=f.read()
f.close()
ret=pickle.loads(st)
+
+ if ret==None:
+ ret=None
+ else:
+ if ret['version']==1:
+ ret=parse_v1(ret)
+
+ if ret['version']==2:
+ ret=parse_v2(ret)
except:
ret=None
@@
-197,14
+206,6
@@
def load():
fn=get_config_fn()
dt0=load_all()
- if dt0==None:
- return
-
- if dt0['version']==1:
- dt0=parse_v1(dt0)
-
- if dt0['version']==2:
- dt0=parse_v2(dt0)
if not dt0['data'].has_key(id):
return