Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSai Vineet <saivineet89@gmail.com>2013-12-19 12:13:56 (GMT)
committer Sai Vineet <saivineet89@gmail.com>2013-12-19 12:13:56 (GMT)
commitcc32238f702bed25ed0aff77eef1b75089b222fa (patch)
tree0dad3900bc7d7a059c55b92cb934af45abdb3673
parentf262a457f5999b0b9ed32288fbabe96e3e5ec6d1 (diff)
parentc1f236fce4e61e614862100ed7550796f86ce0bf (diff)
Merge branch 'master' of git://git.sugarlabs.org/physics/mainline
-rw-r--r--elements/elements.py2
-rw-r--r--physics.py8
2 files changed, 6 insertions, 4 deletions
diff --git a/elements/elements.py b/elements/elements.py
index 4d9a361..625844c 100644
--- a/elements/elements.py
+++ b/elements/elements.py
@@ -595,7 +595,7 @@ class Elements:
for (k,v) in worldmodel['additional_vars'].items():
addvars[k] = v
- if serialized:
+ if serialized and 'trackinfo' in addvars:
trackinfo = addvars['trackinfo']
for key, info in trackinfo.iteritems():
if not info[3]:
diff --git a/physics.py b/physics.py
index 6664f18..e89e12a 100644
--- a/physics.py
+++ b/physics.py
@@ -118,9 +118,11 @@ class PhysicsGame:
path = self.opening_queue.encode('ascii', 'convert')
if os.path.exists(path):
self.world.json_load(path, serialized=True)
- self.full_pos_list = \
- self.world.additional_vars['full_pos_list']
- self.trackinfo = self.world.additional_vars['trackinfo']
+ if 'full_pos_list' in self.world.additional_vars:
+ self.full_pos_list = \
+ self.world.additional_vars['full_pos_list']
+ if 'trackinfo' in self.world.additional_vars:
+ self.trackinfo = self.world.additional_vars['trackinfo']
while self.loop:
while gtk.events_pending():