Patchwork D7276: posix: add a pytype suppression

login
register
mail settings
Submitter phabricator
Date Nov. 7, 2019, 8:33 a.m.
Message ID <1fb617fb7b8212f8d01a8055b7fe9a92@localhost.localdomain>
Download mbox | patch
Permalink /patch/42873/
State Not Applicable
Headers show

Comments

phabricator - Nov. 7, 2019, 8:33 a.m.
Closed by commit rHG147576a4e6a2: posix: add a pytype suppression (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7276?vs=17667&id=17692

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7276/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7276

AFFECTED FILES
  mercurial/posix.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/posix.py b/mercurial/posix.py
--- a/mercurial/posix.py
+++ b/mercurial/posix.py
@@ -323,7 +323,10 @@ 
                     fullpath = os.path.join(cachedir, target)
                     open(fullpath, b'w').close()
                 except IOError as inst:
-                    if inst[0] == errno.EACCES:
+                    if (
+                        inst[0]  # pytype: disable=unsupported-operands
+                        == errno.EACCES
+                    ):
                         # If we can't write to cachedir, just pretend
                         # that the fs is readonly and by association
                         # that the fs won't support symlinks. This