diff options
author | Walter Bender <walter@sugarlabs.org> | 2013-12-18 03:14:58 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2013-12-18 03:14:58 (GMT) |
commit | c1f236fce4e61e614862100ed7550796f86ce0bf (patch) | |
tree | 0dad3900bc7d7a059c55b92cb934af45abdb3673 /physics.py | |
parent | 0e7df29e9b39210c59cf30198084a7b12a6804df (diff) |
check for keys for backward compatibility
Diffstat (limited to 'physics.py')
-rw-r--r-- | physics.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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(): |