← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-compat-update-copyright into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-compat-update-copyright into launchpad:master.

Commit message:
Make update-copyright compatible with Python 3

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/381993

Passing universal_newlines=True to Popen means that we get text output back from it.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-compat-update-copyright into launchpad:master.
diff --git a/utilities/update-copyright b/utilities/update-copyright
index b714447..c58523c 100755
--- a/utilities/update-copyright
+++ b/utilities/update-copyright
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-# Copyright 2010-2013 Canonical Ltd.  This software is licensed under the
+# Copyright 2010-2020 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Update the year in copyright notices.
@@ -72,7 +72,9 @@ def find_changed_files():
     """Use the find-changed-files.sh script."""
     find_changed_files_cmd = [
         os.path.join(UTILITIES_DIR, 'find-changed-files.sh')]
-    filenames = Popen(find_changed_files_cmd, stdout=PIPE).communicate()[0]
+    filenames = Popen(
+        find_changed_files_cmd, stdout=PIPE,
+        universal_newlines=True).communicate()[0]
     return filenames.strip()
 
 def find_and_update():