]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - modules/ftptree.py
more python3 readiness
[projects/pld-ftp-admin.git] / modules / ftptree.py
index e22833117410dd7631003cdef6a28d407c6712f0..10fe86b1eb7fd8289d9d05c35cd690dd75e23066 100644 (file)
@@ -1,5 +1,7 @@
 # vi: encoding=utf-8 ts=8 sts=4 sw=4 et
 
+from __future__ import print_function
+
 import os, config, string, urllib, re, rpm
 from common import fileexists, noarchcachedir
 from baseftptree import BasePkg, BaseFtpTree
@@ -13,23 +15,23 @@ class SomeError(Exception):
         return
 
     def __str__(self):
-        print "","An Error occured!"
+        return "An Error occured!"
 
 def bailoutonerror():
     if not errnum == 0:
-        print "%d error(s) encountered... aborting" % errnum
+        print("%d error(s) encountered... aborting" % errnum)
         raise SomeError
 
 def pinfo(msg):
-    print 'INFO: ' + msg
+    print('INFO: ' + msg)
 
 def perror(msg):
     global errnum
     errnum = errnum + 1
-    print 'ERR: ' + msg
+    print('ERR: ' + msg)
 
 def pwarning(msg):
-    print 'WARN: ' + msg
+    print('WARN: ' + msg)
 
 def rm(file, test = False):
     if test:
This page took 0.082226 seconds and 4 git commands to generate.