changeset 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 d63153611ed5
children 2209e72f9fcb
files hgext/fastannotate/__init__.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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