Skip to content
Snippets Groups Projects
Commit 7afd6af9 authored by jan.bednarik's avatar jan.bednarik
Browse files

calendar utils: Fix reporting of sync fails

parent 9527fbb2
Branches
No related tags found
No related merge requests found
...@@ -7,13 +7,13 @@ class Command(BaseCommand): ...@@ -7,13 +7,13 @@ class Command(BaseCommand):
def handle(self, *args, **options): def handle(self, *args, **options):
self.stdout.write("Updating calendars...") self.stdout.write("Updating calendars...")
for cal in Calendar.objects.all(): for cal in Calendar.objects.all():
self.stdout.write(f"@ {cal.url}") self.stdout.write(f"\n@ {cal.url}")
try: try:
cal.update_source() cal.update_source()
self.stdout.write("+ ok") self.stdout.write("+ ok")
except Exception as e: except Exception as e:
# TODO logging # TODO logging
self.stdout.write("- failed") self.stdout.write("- failed")
self.stderr.write(e) self.stdout.write(str(e))
self.stdout.write("Updating calendars finished!") self.stdout.write("\nUpdating calendars finished!")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment