Merge pull request #11 from wookayin/patch-1

Improve Bakefile detection logic
This commit is contained in:
2019-09-23 02:08:57 -04:00
committed by GitHub
+3 -1
View File
@@ -147,11 +147,13 @@ class Bakefile:
i = 0
for c, d, f in utils.walk_up(root):
if i > max_depth:
raise NoBakefileFound(f"No {filename} found!")
break
elif filename in f:
return Class(path=os.path.join(c, filename))
i += 1
raise NoBakefileFound(f"No {filename} found!")
@property
def source(self):
with open(self.path, "r") as f: