]> git.0d.be Git - panikdb.git/blobdiff - panikdb/stats/management/commands/load-piwik-stats.py
commands: use print as a function
[panikdb.git] / panikdb / stats / management / commands / load-piwik-stats.py
index 044655dfa4f7f20c417bc05593dffd1d78f6962a..33908568c70d4f101cb8408327f5a533eba4ccc5 100644 (file)
@@ -21,10 +21,10 @@ class Command(BaseCommand):
         request = urllib2.Request(url)
         request.add_header('Accept', 'application/json')
         if self.verbose:
-            print 'calling piwik'
+            print('calling piwik')
         result = json.load(urllib2.urlopen(request))
         if self.verbose:
-            print 'collecting results'
+            print('collecting results')
         for day in result:
             day_datetime = datetime.datetime.strptime(day, '%Y-%m-%d')
             for stat_segment in result.get(day):
@@ -36,7 +36,7 @@ class Command(BaseCommand):
                         soundfile = SoundFile.objects.get(id=sound_id)
                     except (SoundFile.DoesNotExist, ValueError):
                         if self.verbose:
-                            print 'failed to process', entry.get('label')
+                            print('failed to process', entry.get('label'))
                         continue
                     try:
                         stat = DailyStat.objects.get(soundfile=soundfile,