[libreoffice] 99/152: explicitly use python3

Rene Engelhard rene at moszumanska.debian.org
Thu Jul 27 19:17:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to tag libreoffice_3.5.0_rc3-0ubuntu2
in repository libreoffice.

commit 7f07b69729edf4f43eb4c9116d36db9dfdd0c84d
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Mon Aug 22 14:35:08 2016 +0200

    explicitly use python3
---
 changelog           |  3 ++-
 rules               |  2 +-
 scripts/joinctrl.py | 14 +++++++-------
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/changelog b/changelog
index 1ba5add..b467eb3 100644
--- a/changelog
+++ b/changelog
@@ -1,8 +1,9 @@
 libreoffice (1:5.2.0-0ubuntu2) yakkety; urgency=medium
 
   * rules: remove spurious comment (thanks Rico)
+  * scripts/joinctrl.py: explicitly use python3
 
- -- Bjoern Michaelsen <bjoern.michaelsen at canonical.com>  Fri, 19 Aug 2016 09:38:24 +0200
+ -- Bjoern Michaelsen <bjoern.michaelsen at canonical.com>  Mon, 22 Aug 2016 14:33:45 +0200
 
 libreoffice (1:5.2.0-0ubuntu1) yakkety; urgency=medium
 
diff --git a/rules b/rules
index 7039c30..ff6006b 100755
--- a/rules
+++ b/rules
@@ -1834,7 +1834,7 @@ ifeq (4.4,$(SYSTEM_GCC_VERSION))
 	perl -pi -e 's/flex \|/flex (>= 2.5.25-7) |/' debian/control
 endif
 
-	python debian/scripts/joinctrl.py < debian/control > debian/control.tmp
+	python3 debian/scripts/joinctrl.py < debian/control > debian/control.tmp
 	mv debian/control.tmp debian/control
 
 	# make -l10n-fi suggest libreoffice-spellcheck-fi to
diff --git a/scripts/joinctrl.py b/scripts/joinctrl.py
index f95e67d..929fc5f 100755
--- a/scripts/joinctrl.py
+++ b/scripts/joinctrl.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/python3
 
 import re, sys, fileinput
 
@@ -13,13 +13,13 @@ def splitlines():
                 field = f
                 break
         if not field:
-            print line
+            print(line)
             continue
         values = [f.strip() for f in line.split(':',1)[1].strip().split(',')]
         if len(values) > 2:
-            print '%s: %s' % (field, ',\n '.join(values))
+            print('%s: %s' % (field, ',\n '.join(values)))
         else:
-            print '%s: %s' % (field, ', '.join(values))
+            print('%s: %s' % (field, ', '.join(values)))
 
 def sort_list(unsorted_list):
     packages = [x for x in unsorted_list if re.match("[a-z0-9]", x)]
@@ -45,9 +45,9 @@ def joinlines():
                     indentation = " " * (len(field) + 2)
                     packages_with_indention = [indentation + x for x in packages]
                     packages_with_indention = ",\n".join(packages_with_indention)
-                    print field + ": " + packages_with_indention.strip()
+                    print(field + ": " + packages_with_indention.strip())
                 else:
-                    print field + ": " + ", ".join(packages).strip()
+                    print(field + ": " + ", ".join(packages).strip())
                 buffer = None
         field = None
         for f in fields:
@@ -57,7 +57,7 @@ def joinlines():
         if field:
             buffer = line.strip()
             continue
-        print line
+        print(line)
 
 def main():
     #splitlines()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git



More information about the Pkg-openoffice-commits mailing list