Patchwork D7285: vfs: more attribute suppressions

login
register
mail settings
Submitter phabricator
Date Nov. 6, 2019, 11:23 p.m.
Message ID <236e1251174e13ff47ebed0f01eff7cd@localhost.localdomain>
Download mbox | patch
Permalink /patch/42852/
State Not Applicable
Headers show

Comments

phabricator - Nov. 6, 2019, 11:23 p.m.
durin42 updated this revision to Diff 17670.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7285?vs=17655&id=17670

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

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

AFFECTED FILES
  mercurial/vfs.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/vfs.py b/mercurial/vfs.py
--- a/mercurial/vfs.py
+++ b/mercurial/vfs.py
@@ -487,7 +487,9 @@ 
             threading.currentThread(),
             threading._MainThread,  # pytype: disable=module-attr
         ):
-            if not self._backgroundfilecloser:
+            if (
+                not self._backgroundfilecloser  # pytype: disable=attribute-error
+            ):
                 raise error.Abort(
                     _(
                         b'backgroundclose can only be used when a '
@@ -495,7 +497,10 @@ 
                     )
                 )
 
-            fp = delayclosedfile(fp, self._backgroundfilecloser)
+            fp = delayclosedfile(
+                fp,
+                self._backgroundfilecloser,  # pytype: disable=attribute-error
+            )
 
         return fp