diff options
Diffstat (limited to 'hercules/tmx_converter.py')
-rwxr-xr-x | hercules/tmx_converter.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hercules/tmx_converter.py b/hercules/tmx_converter.py index a6b0943..76bfa4f 100755 --- a/hercules/tmx_converter.py +++ b/hercules/tmx_converter.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- encoding: utf-8 -*- ## tmx_converter.py - Extract walkmap, warp, and spawn information from maps. @@ -468,8 +468,8 @@ class ContentHandler(xml.sax.ContentHandler): ]) ) self.warp_cnt = True - except AttributeError, prop: - print("\n\nERROR: missing property on object \"%s\": %s is mandatory on a %s object." % (obj.name, prop, obj.__class__.__name__.lower())); + except AttributeError as prop: + print("\n\nERROR: missing property on object \"%s\": %s is mandatory on a %s object." % (obj.name, prop, obj.__class__.__name__.lower())) raise if name == u'data': @@ -558,7 +558,7 @@ def main(argv): map_db.write('%s %d\n' % (arg.split('.')[0], map_count)) map_conf.write(' "%s",\n' % (arg.split('.')[0])) map_count += 1 - except Exception, e: + except Exception as e: if 'CI' in os.environ and str(e) != 'ignore': raise # re-raise to make CI jobs fail elif str(e) == 'ignore': |