diff hgext/remotefilelog/basepack.py @ 49306:2e726c934fcd

py3: catch FileNotFoundError instead of checking errno == ENOENT
author Manuel Jacob <me@manueljacob.de>
date Tue, 31 May 2022 22:50:01 +0200
parents 1bf3eb65e970
children 18c8c18993f0
line wrap: on
line diff
--- a/hgext/remotefilelog/basepack.py	Tue May 31 21:16:17 2022 +0200
+++ b/hgext/remotefilelog/basepack.py	Tue May 31 22:50:01 2022 +0200
@@ -166,9 +166,8 @@
                         )
                     else:
                         ids.add(id)
-        except OSError as ex:
-            if ex.errno != errno.ENOENT:
-                raise
+        except FileNotFoundError:
+            pass
 
     def _getavailablepackfilessorted(self):
         """Like `_getavailablepackfiles`, but also sorts the files by mtime,