Bug 1270317 - Use modern exception syntax in purgelong; r=jlund draft
authorGregory Szorc <gps@mozilla.com>
Fri, 06 May 2016 10:49:51 -0700
changeset 364987 2178aee72f3ce06e9e08e7b22dd8bc074c01da41
parent 364986 30918037c5e1ca8d66c46c17f71b15df4847731e
child 364988 4b5c673c7d6e930d504b89fe93c9b9d6e17140e7
push id17607
push usergszorc@mozilla.com
push dateMon, 09 May 2016 20:37:43 +0000
reviewersjlund
bugs1270317
milestone49.0a1
Bug 1270317 - Use modern exception syntax in purgelong; r=jlund MozReview-Commit-ID: ISd4b14mjkl
testing/mozharness/external_tools/purgelong.py
--- a/testing/mozharness/external_tools/purgelong.py
+++ b/testing/mozharness/external_tools/purgelong.py
@@ -48,17 +48,17 @@ else:
 
 
 def unlink_wrapper(unlink_orig, fn, ui):
     '''Calls the original unlink function, and if that fails, calls
     unlink_long'''
     try:
         ui.debug('calling unlink_orig %s\n' % fn)
         return unlink_orig(fn)
-    except WindowsError, e:
+    except WindowsError as e:
         # windows error 3 corresponds to ERROR_PATH_NOT_FOUND
         # only handle this case; re-raise the exception for other kinds of
         # failures
         if e.winerror != 3:
             raise
         ui.debug('caught WindowsError ERROR_PATH_NOT_FOUND; '
                  'calling unlink_long %s\n' % fn)
         return unlink_long(fn)