X-Git-Url: https://git.0d.be/?p=panikdb.git;a=blobdiff_plain;f=panikdb%2Fstats%2Fmanagement%2Fcommands%2Fload-piwik-stats.py;h=33908568c70d4f101cb8408327f5a533eba4ccc5;hp=044655dfa4f7f20c417bc05593dffd1d78f6962a;hb=f41ae5b1f74134a1cb229f6cfaa2252f565ecbd3;hpb=13c070e4d57185d80329a1c4637158e83df4bbe5 diff --git a/panikdb/stats/management/commands/load-piwik-stats.py b/panikdb/stats/management/commands/load-piwik-stats.py index 044655d..3390856 100644 --- a/panikdb/stats/management/commands/load-piwik-stats.py +++ b/panikdb/stats/management/commands/load-piwik-stats.py @@ -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,