diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-07-22 21:26:40 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-07-22 21:26:40 -0500 |
commit | b12d27291609d79abe2e0e0817acdf5a1c3e2acb (patch) | |
tree | d1c5f6a3fcfbe894bbeeca12615dd17bdc3d053f | |
parent | efafd2246874464c59d27d444ee6b21e91cde3d7 (diff) | |
download | koopatlas-b12d27291609d79abe2e0e0817acdf5a1c3e2acb.tar.gz koopatlas-b12d27291609d79abe2e0e0817acdf5a1c3e2acb.zip |
pushed a fix to prevent outdated map errors from causing crashes
-rw-r--r-- | src/mapfile.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mapfile.py b/src/mapfile.py index a6ebede..e1494b1 100644 --- a/src/mapfile.py +++ b/src/mapfile.py @@ -79,7 +79,10 @@ def load(string): obj = clsObj() for attrName in clsObj.__dump_attribs__: - setattr(obj, attrName, source[attrName]) + try: + setattr(obj, attrName, source[attrName]) + except: + print "{0} was missing the attribute {1}".format(obj, attrName) if hasattr(obj, '_preload'): obj._preload(source) |