Skip to content
Snippets Groups Projects
Commit f340b95e authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

gitdirstate: use os.access() rather than bare except

parent 7a3caae2
No related branches found
No related tags found
1 merge request!115Minor stylistic issues
......@@ -99,12 +99,8 @@
files.append(util.expandpath(path))
patterns = []
# Only use .gitignore if there's no .hgignore
try:
fp = open(files[0], 'rb')
fp.close()
except:
fns = self._finddotgitignores()
for fn in fns:
if not os.access(files[0], os.R_OK):
for fn in self._finddotgitignores():
d = os.path.dirname(fn)
fn = self.pathto(fn)
if not os.path.exists(fn):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment