display fixes for #71

pull/76/head
meisnate12 4 years ago
parent 57bdbca5f4
commit ac0d707e27

@ -157,10 +157,10 @@ class CollectionBuilder:
logger.error(f"Collection Error: failed to parse schedule: {schedule}") logger.error(f"Collection Error: failed to parse schedule: {schedule}")
else: else:
logger.error(f"Collection Error: schedule attribute {schedule} invalid") logger.error(f"Collection Error: schedule attribute {schedule} invalid")
if self.schedule is None: if len(self.schedule) == 0:
skip_collection = False skip_collection = False
if skip_collection: if skip_collection:
raise Failed(f"Skipping Collection {self.name}") raise Failed(f"{self.schedule}\n\nCollection {self.name} not scheduled to run")
logger.info(f"Scanning {self.name} Collection") logger.info(f"Scanning {self.name} Collection")

@ -372,9 +372,12 @@ class Config:
rating_key_map = {} rating_key_map = {}
try: try:
builder = CollectionBuilder(self, library, c, collections[c]) builder = CollectionBuilder(self, library, c, collections[c])
except Exception as e: except Failed as ef:
util.print_multiline(ef, error=True)
continue
except Exception as ee:
util.print_stacktrace() util.print_stacktrace()
logger.error(e) logger.error(ee)
continue continue
try: try:
@ -384,7 +387,7 @@ class Config:
collection_obj = None collection_obj = None
collection_name = c collection_name = c
if builder.schedule is not None: if len(builder.schedule) > 0:
util.print_multiline(builder.schedule, info=True) util.print_multiline(builder.schedule, info=True)
logger.info("") logger.info("")

Loading…
Cancel
Save