]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - bin/pfa-from-incoming
more python3 readiness
[projects/pld-ftp-admin.git] / bin / pfa-from-incoming
index 6523ea18aa9d90567780ec3715ec4aa76b5f356a..92b75d1c740037b37bd53588d8d603e550df7e0f 100755 (executable)
@@ -1,6 +1,8 @@
 #!/usr/bin/env python
 # vi: encoding=utf-8 ts=8 sts=4 sw=4 et
 
+from __future__ import print_function
+
 import sys, os, stat, time, re
 sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
 from config import incoming_dir, default_to, ftp_archs
@@ -164,13 +166,13 @@ Subject: %s
 try:
     ftpio.connect('from-incoming-pid-%s' % os.getpid())
 except:
-    print "Can't get ftpiod connection"
+    print("Can't get ftpiod connection")
     sys.exit(1)
 
 ftptree = BaseFtpTree(cval['default_to'])
 
 if not ftpio.lock(cval['default_to']):
-    print "Can't get lock: %s" % cval['default_to']
+    print("Can't get lock: %s" % cval['default_to'])
     sys.exit(1)
 
 moved_anything = False
@@ -240,7 +242,7 @@ for arch in ftp_archs:
                 except OSError, e:
                     l = "Removing %s problem: %s" % (dstfile + '/' + rpmfile, e)
                     ftpio.log(l)
-                    print l
+                    print(l)
 
         f = open(default_to + 'SRPMS/.metadata/' + srpm + '.info', 'a')
         for rpmfile in srcpkg.files['ARCH']:
@@ -268,7 +270,7 @@ for arch in ftp_archs:
                 except OSError, e:
                     l = "Moving %s to %s problem: %s" % (srcfile, dstfile, e)
                     ftpio.log(l)
-                    print l
+                    print(l)
         f.close()
 
         rm(incoming_dir + arch + '/' + uploadinfo)
This page took 0.056949 seconds and 4 git commands to generate.