hgext/largefiles/lfcommands.py
changeset 49306 2e726c934fcd
parent 49248 63fd0282ad40
child 49959 c166b212bdee
--- a/hgext/largefiles/lfcommands.py	Tue May 31 21:16:17 2022 +0200
+++ b/hgext/largefiles/lfcommands.py	Tue May 31 22:50:01 2022 +0200
@@ -9,7 +9,6 @@
 '''High-level command function for lfconvert, plus the cmdtable.'''
 
 import binascii
-import errno
 import os
 import shutil
 
@@ -474,10 +473,8 @@
     for lfile in lfiles:
         try:
             expectedhash = lfutil.readasstandin(ctx[lfutil.standin(lfile)])
-        except IOError as err:
-            if err.errno == errno.ENOENT:
-                continue  # node must be None and standin wasn't found in wctx
-            raise
+        except FileNotFoundError:
+            continue  # node must be None and standin wasn't found in wctx
         if not lfutil.findfile(repo, expectedhash):
             toget.append((lfile, expectedhash))