diff hgext/fastannotate/__init__.py @ 39882:c841e8855cd3

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.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 26 Sep 2018 20:49:28 -0400
parents 57d4754e44b8
children 0152a907f714
line wrap: on
line diff
--- 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