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,7 +65,7 @@ class Session(object): | ||
65 | self.language = "" # "pt_BR", "es" | 65 | self.language = "" # "pt_BR", "es" |
66 | 66 | ||
67 | self.random_id = randint(0,pow(10,16)) | 67 | self.random_id = randint(0,pow(10,16)) |
68 | - print self.random_id | 68 | + #print self.random_id |
69 | 69 | ||
70 | # Recent projects list | 70 | # Recent projects list |
71 | self.recent_projects = [(const.SAMPLE_DIR, "Cranium.inv3")] | 71 | self.recent_projects = [(const.SAMPLE_DIR, "Cranium.inv3")] |
@@ -248,8 +248,6 @@ class Session(object): | @@ -248,8 +248,6 @@ class Session(object): | ||
248 | self.project_status = config.get('session', 'status') | 248 | self.project_status = config.get('session', 'status') |
249 | self.debug = config.get('session','debug') | 249 | self.debug = config.get('session','debug') |
250 | self.language = config.get('session','language') | 250 | self.language = config.get('session','language') |
251 | - self.random_id = config.get('session','random_id') | ||
252 | - | ||
253 | self.recent_projects = eval(config.get('project','recent_projects')) | 251 | self.recent_projects = eval(config.get('project','recent_projects')) |
254 | self.homedir = config.get('paths','homedir') | 252 | self.homedir = config.get('paths','homedir') |
255 | self.tempdir = config.get('paths','tempdir') | 253 | self.tempdir = config.get('paths','tempdir') |
@@ -258,6 +256,7 @@ class Session(object): | @@ -258,6 +256,7 @@ class Session(object): | ||
258 | 256 | ||
259 | self.surface_interpolation = config.get('session', 'surface_interpolation') | 257 | self.surface_interpolation = config.get('session', 'surface_interpolation') |
260 | self.rendering = config.get('session', 'rendering') | 258 | self.rendering = config.get('session', 'rendering') |
259 | + self.random_id = config.get('session','random_id') | ||
261 | return True | 260 | return True |
262 | 261 | ||
263 | except(ConfigParser.NoSectionError, ConfigParser.MissingSectionHeaderError, | 262 | except(ConfigParser.NoSectionError, ConfigParser.MissingSectionHeaderError, |
@@ -273,8 +272,7 @@ class Session(object): | @@ -273,8 +272,7 @@ class Session(object): | ||
273 | #Added to fix new version compatibility | 272 | #Added to fix new version compatibility |
274 | self.surface_interpolation = 0 | 273 | self.surface_interpolation = 0 |
275 | self.rendering = 0 | 274 | self.rendering = 0 |
276 | - self.random_id = randint(0,pow(10,16)) | ||
277 | - | 275 | + self.random_id = randint(0,pow(10,16)) |
278 | self.CreateSessionFile() | 276 | self.CreateSessionFile() |
279 | return True | 277 | return True |
280 | 278 |