py3: replace a StandardError reference
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 26 Sep 2018 20:49:28 -0400
changeset 39882 c841e8855cd3
parent 39881 d63153611ed5
child 39883 2209e72f9fcb
py3: replace a StandardError reference This doesn't exist on py3, and the standard way of handling this seems to be to catch both exceptions.
hgext/fastannotate/__init__.py
--- a/hgext/fastannotate/__init__.py	Mon Sep 24 15:19:52 2018 -0700
+++ b/hgext/fastannotate/__init__.py	Wed Sep 26 20:49:28 2018 -0400
@@ -155,7 +155,7 @@
     try:
         import fcntl
         fcntl.flock
-    except StandardError:
+    except (AttributeError, ImportError):
         return False
     else:
         return True