lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix convert-ly with Python 3 (issue 555260044 by address@hidden)


From: jonas . hahnfeld
Subject: Re: Fix convert-ly with Python 3 (issue 555260044 by address@hidden)
Date: Tue, 04 Feb 2020 11:40:40 -0800

Reviewers: dak,

Message:
On 2020/02/04 19:32:10, dak wrote:
> Foreseeable consequences for Python 2.7?

None, because the minimum version is Python 3.5

Description:
Fix convert-ly with Python 3

The error was "'str' object has no attribute 'decode'", so it already
is decoded. The encoding seems to also be correct, as filenames with
Unicode characters work just fine.
It's worrying that none of the usual testing commands seem to invoke
the script with a real input file, only the output of --help is used.

---
If possible I'd like to push this as soon as possible. The normal
process
fails on convert-ly anyhow...

Please review this at https://codereview.appspot.com/555260044/

Affected files (+1, -1 lines):
  M scripts/convert-ly.py


Index: scripts/convert-ly.py
diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py
index 
ae2ea3161030ae59ca5656675490af0b8cb18301..e4f9f4045ba68b1c3d9b211a26c2ac08a7145da4
 100644
--- a/scripts/convert-ly.py
+++ b/scripts/convert-ly.py
@@ -358,7 +358,7 @@ def main ():
 
     errors = 0
     for f in files:
-        f = f.decode (sys.stdin.encoding or "utf-8")
+        f = f
         if f == '-':
             f = ''
         elif not os.path.isfile (f):





reply via email to

[Prev in Thread] Current Thread [Next in Thread]