diff options
author | jak1 <jak1@themanaworld.org> | 2022-06-19 09:34:16 +0200 |
---|---|---|
committer | jak1 <jak1@themanaworld.org> | 2022-06-19 09:34:16 +0200 |
commit | 38fcd221d8fe03208abdafe0f01a6e54a601b71a (patch) | |
tree | 6a1ba5a5943b9dc0617e0046b39b82ba2284d53e /hercules/tmx_converter.py | |
parent | 9a351fb1abd5694bbbb7e38fcb64bb30b3fa74bb (diff) | |
download | tools-38fcd221d8fe03208abdafe0f01a6e54a601b71a.tar.gz tools-38fcd221d8fe03208abdafe0f01a6e54a601b71a.tar.bz2 tools-38fcd221d8fe03208abdafe0f01a6e54a601b71a.tar.xz tools-38fcd221d8fe03208abdafe0f01a6e54a601b71a.zip |
updated all leftover scripts to py3
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': |