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

update

parent dd18d321
Branches
Tags
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.
Please register or to comment