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

update

parent ca3c6fee
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,12 @@ from datetime import datetime
import caosdb as db
from caosdb.exceptions import TransactionError
#from something import get_entity
def get_entity(name):
ent = db.Entity(name=name)
ent.retrieve()
return ent
class AbstractCFood(object):
......
......@@ -35,18 +35,18 @@ class Crawler(object):
def crawl(self, files):
for crawled_file in files:
if crawled_file.size == 0:
crawled_file.add_message(
type="Warning", description="This file is empty. Shouldn't we delete it?")
self.report.append(f)
# if crawled_file.size == 0:
# crawled_file.add_message(
# type="Warning", description="This file is empty. Shouldn't we delete it?")
# self.report.append(crawled_file)
continue
# continue
for cfood in self.food:
match = cfood.pattern.match(crawled_file.path)
if match is not None:
cfood.treat_match(crawled_file.path, match)
cfood.treat_match(crawled_file, match)
@staticmethod
def query_files(path):
......
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