Skip to content
Snippets Groups Projects
Commit 82755021 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

ENH: allow to disable interactive mode

parent 74dde18d
No related branches found
No related tags found
No related merge requests found
......@@ -61,4 +61,4 @@ if __name__ == "__main__":
AnalysisCFood, ExperimentCFood,
PublicationCFood, SimulationCFood,
])
c.crawl(files, security_level=UPDATE)
c.crawl(files, interactive=False, security_level=UPDATE)
......@@ -74,7 +74,7 @@ class Crawler(object):
if self.use_cache:
self.cache = Cache()
def crawl(self, files, security_level=RETRIEVE):
def crawl(self, files, interactive=True, security_level=RETRIEVE):
errors_occured = False
tbs = []
guard.set_level(level=security_level)
......@@ -147,7 +147,7 @@ class Crawler(object):
print("Attention: More than one matching cfood!")
print("Tried to match {}".format(crawled_file.path))
if "y" != input("Do you want to continue? (y)"):
if interactive and "y" != input("Do you want to continue? (y)"):
return
if self.verbosity >= INFO:
......
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