From 7afd6af9e0a8bfe1379fde892bc31d5f6d5e44f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Bedna=C5=99=C3=ADk?= <jan.bednarik@gmail.com>
Date: Mon, 29 Jun 2020 15:00:34 +0200
Subject: [PATCH] calendar utils: Fix reporting of sync fails

---
 calendar_utils/management/commands/update_callendars.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/calendar_utils/management/commands/update_callendars.py b/calendar_utils/management/commands/update_callendars.py
index ef6de3dce..a66e95aac 100644
--- a/calendar_utils/management/commands/update_callendars.py
+++ b/calendar_utils/management/commands/update_callendars.py
@@ -7,13 +7,13 @@ class Command(BaseCommand):
     def handle(self, *args, **options):
         self.stdout.write("Updating calendars...")
         for cal in Calendar.objects.all():
-            self.stdout.write(f"@ {cal.url}")
+            self.stdout.write(f"\n@ {cal.url}")
             try:
                 cal.update_source()
                 self.stdout.write("+ ok")
             except Exception as e:
                 # TODO logging
                 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!")
-- 
GitLab