[gimp-web] Add parentheses to print() commands



commit 17e9a7c1ff6dd8736e4750aa10d11c4120670d28
Author: Michael Schumacher <schumaml gmx de>
Date:   Tue Apr 21 19:19:25 2020 +0200

    Add parentheses to print() commands

 pelicanconf_common.py                  |  6 +++---
 plugins/gimp_mirrors/gimp_mirrors.py   | 14 +++++++-------
 plugins/random_header/random_header.py |  6 +++---
 3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/pelicanconf_common.py b/pelicanconf_common.py
index 39e554ec..d92bd65c 100644
--- a/pelicanconf_common.py
+++ b/pelicanconf_common.py
@@ -243,7 +243,7 @@ if 'STABLE' in GIMP:
                 if 'revision' in info['macos'][0]:
                     MACOS_REVISION = info['macos'][0]["revision"]
 else:
-    print 'STABLE not defined'
+    print('STABLE not defined')
 
 if 'OLDSTABLE' in GIMP:
     # Set the current stable GIMP version from
@@ -275,7 +275,7 @@ if 'OLDSTABLE' in GIMP:
                 MACOS_FILE_OLDSTABLE = info['macos'][0]['filename']
                 MACOS_HASH_OLDSTABLE = info['macos'][0]['md5']
 else:
-    print 'OLDSTABLE not defined'
+    print('OLDSTABLE not defined')
 
 if 'DEVELOPMENT' in GIMP:
     # development version
@@ -324,7 +324,7 @@ if 'DEVELOPMENT' in GIMP:
                     FLATPAK_FILE_DEVELOPMENT[arch] = package[0]['filename']
                     FLATPAK_HASH_DEVELOPMENT[arch] = package[0]['md5']
 else:
-    print 'DEVELOPMENT not defined'
+    print('DEVELOPMENT not defined')
 
 #
 # Random Header Background Image
diff --git a/plugins/gimp_mirrors/gimp_mirrors.py b/plugins/gimp_mirrors/gimp_mirrors.py
index 4b972831..f8cab4fb 100644
--- a/plugins/gimp_mirrors/gimp_mirrors.py
+++ b/plugins/gimp_mirrors/gimp_mirrors.py
@@ -71,12 +71,12 @@ def do_mirrors(path, context):
                 data = json.load(data_file)
 
                 for record in data:
-                    #print "####"
-                    #print record
+                    #print("####")
+                    #print)record)
 
                     try:
                         country = gi.country_name_by_name( record )
-                        #print country
+                        #print(country)
 
                         if country in mirrors:
                             mirrors[ country ] += data[ record ]
@@ -84,7 +84,7 @@ def do_mirrors(path, context):
                             mirrors[ country ] = data[ record ]
 
                     except:
-                        print "cannot resolve record: ", record
+                        print("cannot resolve record: ", record)
 
                 try:
                     with open( path, 'r') as f:
@@ -96,10 +96,10 @@ def do_mirrors(path, context):
                         f.write( s.encode('utf-8') )
 
                 except:
-                    print "Trouble with reading/writing path."
+                    print("Trouble with reading/writing path.")
 
         except IOError:
-            print "Cannot open /content/downloads/mirrors.json!"
+            print("Cannot open /content/downloads/mirrors.json!")
             try:
                 with open( path, 'r') as f:
                     s = f.read()
@@ -110,7 +110,7 @@ def do_mirrors(path, context):
                     f.write( s.encode('utf-8') )
 
             except:
-                print "Trouble with reading/writing path."
+                print("Trouble with reading/writing path.")
 
 
 
diff --git a/plugins/random_header/random_header.py b/plugins/random_header/random_header.py
index f18df440..7e931027 100644
--- a/plugins/random_header/random_header.py
+++ b/plugins/random_header/random_header.py
@@ -18,12 +18,12 @@ def do_headerimg(pelican):
     HEADER_IMG_STYLE = "#banner { background-image: linear-gradient(rgba(44,52,80,0.5), rgba(44,62,80,0.5)), 
url('"+ pelican.settings['HEADER_IMG']['file'] +"'); }"
 
     if os.path.exists('./output/theme/css/home.css'):
-        print "Appending banner style to home.css..."
+        print("Appending banner style to home.css...")
         with open('./output/theme/css/home.css', 'a') as cssfile:
             cssfile.write( HEADER_IMG_STYLE )
     #else:
-    #    print "Appending banner style to home.css..." 
-    #    print "The path doesn't exist? (possibly building i18n - just wait)"
+    #    print("Appending banner style to home.css...")
+    #    print("The path doesn't exist? (possibly building i18n - just wait)")
 
 
 def register():


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]