From 38fcd221d8fe03208abdafe0f01a6e54a601b71a Mon Sep 17 00:00:00 2001 From: jak1 Date: Sun, 19 Jun 2022 09:34:16 +0200 Subject: updated all leftover scripts to py3 --- hercules/tmx_converter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hercules/tmx_converter.py') 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': -- cgit v1.2.3-70-g09d2