diff --git a/pandora/item/management/commands/rebuildcache.py b/pandora/item/management/commands/rebuildcache.py index b531e17ff..d87ecf645 100644 --- a/pandora/item/management/commands/rebuildcache.py +++ b/pandora/item/management/commands/rebuildcache.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 +from __future__ import print_function import time @@ -22,7 +23,7 @@ class Command(BaseCommand): count = pos = models.Item.objects.count() while offset <= count: for i in models.Item.objects.all().order_by('id')[offset:offset+chunk]: - print pos, i.public_id + print(pos, i.public_id) i.save() time.sleep(1) #dont overload db pos -= 1 diff --git a/pandora/item/management/commands/update_itemsfolder.py b/pandora/item/management/commands/update_itemsfolder.py index 0fd25d65b..6ed70605c 100644 --- a/pandora/item/management/commands/update_itemsfolder.py +++ b/pandora/item/management/commands/update_itemsfolder.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 +from __future__ import print_function import os @@ -13,8 +14,8 @@ from ... import models def link(src, target): if not os.path.exists(target): ox.makedirs(os.path.dirname(target)) - print src - print '\t', target + print(src) + print('\t', target) os.symlink(src, target) class Command(BaseCommand): @@ -28,7 +29,7 @@ class Command(BaseCommand): for i in models.Item.objects.all(): for f in i.files.all(): path = f.normalize_item_path() - print path + print(path) if settings.CONFIG['site']['folderdepth'] == 4: path = os.path.join(path[0], path) if f.data: