Commit 5d2c61b4ef5981ac8c20fe0e21f96d121e97f9df
Committed by
Thiago Franco de Moraes
1 parent
c122aeb3
Exists in
beta4
and in
1 other branch
FIX: backward compatibility for random_id
Showing
1 changed file
with
3 additions
and
5 deletions
Show diff stats
invesalius/session.py
... | ... | @@ -65,7 +65,7 @@ class Session(object): |
65 | 65 | self.language = "" # "pt_BR", "es" |
66 | 66 | |
67 | 67 | self.random_id = randint(0,pow(10,16)) |
68 | - print self.random_id | |
68 | + #print self.random_id | |
69 | 69 | |
70 | 70 | # Recent projects list |
71 | 71 | self.recent_projects = [(const.SAMPLE_DIR, "Cranium.inv3")] |
... | ... | @@ -248,8 +248,6 @@ class Session(object): |
248 | 248 | self.project_status = config.get('session', 'status') |
249 | 249 | self.debug = config.get('session','debug') |
250 | 250 | self.language = config.get('session','language') |
251 | - self.random_id = config.get('session','random_id') | |
252 | - | |
253 | 251 | self.recent_projects = eval(config.get('project','recent_projects')) |
254 | 252 | self.homedir = config.get('paths','homedir') |
255 | 253 | self.tempdir = config.get('paths','tempdir') |
... | ... | @@ -258,6 +256,7 @@ class Session(object): |
258 | 256 | |
259 | 257 | self.surface_interpolation = config.get('session', 'surface_interpolation') |
260 | 258 | self.rendering = config.get('session', 'rendering') |
259 | + self.random_id = config.get('session','random_id') | |
261 | 260 | return True |
262 | 261 | |
263 | 262 | except(ConfigParser.NoSectionError, ConfigParser.MissingSectionHeaderError, |
... | ... | @@ -273,8 +272,7 @@ class Session(object): |
273 | 272 | #Added to fix new version compatibility |
274 | 273 | self.surface_interpolation = 0 |
275 | 274 | self.rendering = 0 |
276 | - self.random_id = randint(0,pow(10,16)) | |
277 | - | |
275 | + self.random_id = randint(0,pow(10,16)) | |
278 | 276 | self.CreateSessionFile() |
279 | 277 | return True |
280 | 278 | ... | ... |