[gimp-web/migrate/py3: 60/65] Modify plugins to use correct print() functions



commit c3a1006cc7dac88cba3e0f3fc6ec5b679d1f9a03
Author: Pat David <patdavid gmail com>
Date:   Thu Jul 11 22:59:09 2019 -0500

    Modify plugins to use correct print() functions

 plugins/gimp_mirrors/gimp_mirrors.py   | 8 ++++----
 plugins/random_header/random_header.py | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/plugins/gimp_mirrors/gimp_mirrors.py b/plugins/gimp_mirrors/gimp_mirrors.py
index 4b972831..0d53502e 100644
--- a/plugins/gimp_mirrors/gimp_mirrors.py
+++ b/plugins/gimp_mirrors/gimp_mirrors.py
@@ -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..d12057ed 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]