From 283767a23071d98a460ca6c15abc05ea01f11603 Mon Sep 17 00:00:00 2001 From: Sven Harpering Date: Fri, 13 Jan 2017 13:27:02 +0100 Subject: [PATCH] Fix Python 2.x to 3.x syntax --- tools/src/delete_rows_from_fs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/src/delete_rows_from_fs.py b/tools/src/delete_rows_from_fs.py index 0d4e0b6..39708cd 100644 --- a/tools/src/delete_rows_from_fs.py +++ b/tools/src/delete_rows_from_fs.py @@ -155,7 +155,7 @@ def main(*argv): outputPrinter(message="with error message: %s" % synerror,typeOfMessage='error') outputPrinter(message="ArcPy Error Message: %s" % arcpy.GetMessages(2),typeOfMessage='error') arcpy.SetParameterAsText(7, "false") - except (common.ArcRestHelperError),e: + except (common.ArcRestHelperError) as e: outputPrinter(message=e,typeOfMessage='error') arcpy.SetParameterAsText(7, "false") except: @@ -190,6 +190,6 @@ def main(*argv): gc.collect() if __name__ == "__main__": argv = tuple(arcpy.GetParameterAsText(i) - for i in xrange(arcpy.GetArgumentCount())) + for i in range(arcpy.GetArgumentCount())) main(*argv)