]> git.0d.be Git - django-panik-newsletter.git/commitdiff
commands: use print as a function
authorFrédéric Péters <fpeters@0d.be>
Sat, 4 Jan 2020 16:58:59 +0000 (17:58 +0100)
committerFrédéric Péters <fpeters@0d.be>
Sat, 4 Jan 2020 16:58:59 +0000 (17:58 +0100)
newsletter/management/commands/load-from-spip-liste.py
newsletter/management/commands/update_newsletter_subscribers.py

index db1ba23d282560ed4472eb997dfe98c0f1bff3a3..49ef1cfa3d28817b8e0c94dbf0f0f1efda1e3c19 100644 (file)
@@ -35,7 +35,7 @@ class Command(BaseCommand):
 
         with open(filename) as fd:
             if self.verbose:
-                print 'Reading SPIP dump file'
+                print('Reading SPIP dump file')
             content = fd.read()
             # the spip_courriers parts of the spip export are not properly
             # encoded, we manually remove them here so the XML file can be
@@ -47,7 +47,7 @@ class Command(BaseCommand):
             self.load_authors()
 
             if self.verbose:
-                print 'Creating subscribers'
+                print('Creating subscribers')
             for author_xml in self.root.iter('spip_auteurs_elargis'):
                 if author_xml.find('spip_listes_format').text not in ('texte', 'html'):
                     continue
index 1f156cb12a2a4803125d3828f0a9b6f2d4af3d61..819ecfe811c6bb79959080b7a22c796e691720a7 100644 (file)
@@ -12,5 +12,5 @@ class Command(BaseCommand):
 
         for subscriber in Subscriber.objects.filter(is_validated=True).exclude(is_registered=True):
             if self.verbose:
-                print 'subscribing', subscriber.email
+                print('subscribing', subscriber.email)
             subscriber.subscribe_in_mailman()