comparison 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
comparison
equal deleted inserted replaced
39881:d63153611ed5 39882:c841e8855cd3
153 153
154 def _flockavailable(): 154 def _flockavailable():
155 try: 155 try:
156 import fcntl 156 import fcntl
157 fcntl.flock 157 fcntl.flock
158 except StandardError: 158 except (AttributeError, ImportError):
159 return False 159 return False
160 else: 160 else:
161 return True 161 return True
162 162
163 def uisetup(ui): 163 def uisetup(ui):