comparison mercurial/posix.py @ 43525:147576a4e6a2

posix: add a pytype suppression This one seems a little sketchier than the others, but this will clean up when we're Python 3-only. Differential Revision: https://phab.mercurial-scm.org/D7276
author Augie Fackler <augie@google.com>
date Wed, 06 Nov 2019 15:03:02 -0500
parents c59eb1560c44
children 9f70512ae2cf
comparison
equal deleted inserted replaced
43524:949b4d545c90 43525:147576a4e6a2
321 target = b'checklink-target' 321 target = b'checklink-target'
322 try: 322 try:
323 fullpath = os.path.join(cachedir, target) 323 fullpath = os.path.join(cachedir, target)
324 open(fullpath, b'w').close() 324 open(fullpath, b'w').close()
325 except IOError as inst: 325 except IOError as inst:
326 if inst[0] == errno.EACCES: 326 if (
327 inst[0] # pytype: disable=unsupported-operands
328 == errno.EACCES
329 ):
327 # If we can't write to cachedir, just pretend 330 # If we can't write to cachedir, just pretend
328 # that the fs is readonly and by association 331 # that the fs is readonly and by association
329 # that the fs won't support symlinks. This 332 # that the fs won't support symlinks. This
330 # seems like the least dangerous way to avoid 333 # seems like the least dangerous way to avoid
331 # data loss. 334 # data loss.