Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 33018:071732d9c210
py3: check for bytes instead of str in isinstance
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 22 Jun 2017 03:20:11 +0530 |
parents | 11c0bb4ccc76 |
children | 6294654453ee |
comparison
equal
deleted
inserted
replaced
33017:c31d45623304 | 33018:071732d9c210 |
---|---|
128 raise | 128 raise |
129 return thing | 129 return thing |
130 | 130 |
131 def islocal(repo): | 131 def islocal(repo): |
132 '''return true if repo (or path pointing to repo) is local''' | 132 '''return true if repo (or path pointing to repo) is local''' |
133 if isinstance(repo, str): | 133 if isinstance(repo, bytes): |
134 try: | 134 try: |
135 return _peerlookup(repo).islocal(repo) | 135 return _peerlookup(repo).islocal(repo) |
136 except AttributeError: | 136 except AttributeError: |
137 return False | 137 return False |
138 return repo.local() | 138 return repo.local() |