Show More
@@ -575,11 +575,17 b' class obsstore(object):' | |||
|
575 | 575 | return len(self._all) |
|
576 | 576 | |
|
577 | 577 | def __nonzero__(self): |
|
578 | from . import statichttprepo | |
|
579 | ||
|
580 | if isinstance(self.repo, statichttprepo.statichttprepository): | |
|
581 | # If repo is accessed via static HTTP, then we can't use os.stat() | |
|
582 | # to just peek at the file size. | |
|
583 | return len(self._data) > 1 | |
|
578 | 584 | if not self._cached('_all'): |
|
579 | 585 | try: |
|
580 | 586 | return self.svfs.stat(b'obsstore').st_size > 1 |
|
581 | 587 | except OSError as inst: |
|
582 |
if inst.errno |
|
|
588 | if inst.errno != errno.ENOENT: | |
|
583 | 589 | raise |
|
584 | 590 | # just build an empty _all list if no obsstore exists, which |
|
585 | 591 | # avoids further stat() syscalls |
General Comments 0
You need to be logged in to leave comments.
Login now