[gimp-web/pat/py3: 1/5] Fix 'print' call with parens ()



commit 21f7d9cb0bfb2c4cddf6f50fc2a3267ef05a1b48
Author: Pat David <patdavid gmail com>
Date:   Wed Jan 29 16:58:22 2020 -0600

    Fix 'print' call with parens ()

 pelicanconf_common.py                  |  6 +++---
 plugins/gimp_mirrors/gimp_mirrors.py   | 10 +++++-----
 plugins/random_header/random_header.py |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/pelicanconf_common.py b/pelicanconf_common.py
index e8f235b6..39f14779 100644
--- a/pelicanconf_common.py
+++ b/pelicanconf_common.py
@@ -237,7 +237,7 @@ if 'STABLE' in GIMP:
                 if 'min-support' in info['macos'][0]:
                     MACOS_MIN_SUPPORT = info['macos'][0]["min-support"]
 else:
-    print 'STABLE not defined'
+    print('STABLE not defined')
 
 if 'OLDSTABLE' in GIMP:
     # Set the current stable GIMP version from
@@ -269,7 +269,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
@@ -318,7 +318,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..b9122e56 100644
--- a/plugins/gimp_mirrors/gimp_mirrors.py
+++ b/plugins/gimp_mirrors/gimp_mirrors.py
@@ -71,7 +71,7 @@ def do_mirrors(path, context):
                 data = json.load(data_file)
 
                 for record in data:
-                    #print "####"
+                    #print("####")
                     #print record
 
                     try:
@@ -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..cbb23c9f 100644
--- a/plugins/random_header/random_header.py
+++ b/plugins/random_header/random_header.py
@@ -18,7 +18,7 @@ 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:


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