X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fconvert-ly.py;h=7acd2e29dac7ee1f908a9bc0f5ec50131d798041;hb=468619111ee6009098c318243e53d98cb884ef2c;hp=e14a137f97a71e2cad18e2aecf1e8aa8bff3ab8a;hpb=436824b892927e1c7eb0142698c4c76b7240590b;p=lilypond.git diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index e14a137f97..7acd2e29da 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -45,6 +45,9 @@ lilypond_version_strict_re = re.compile (lilypond_version_strict_re_str) help_summary = ( _ ('''Update LilyPond input to newer version. By default, update from the version taken from the \\version command, to the current LilyPond version.''') ++ "\n" ++ _ ("If FILE is `-', read from standard input.") ++ "\n\n" + _ ("Examples:") + ''' $ convert-ly -e old.ly @@ -334,10 +337,10 @@ def main (): errors = 0 for f in files: - if f == '-': - continue f = f.decode (sys.stdin.encoding or "utf-8") - if not os.path.isfile (f): + if f == '-': + f = '' + elif not os.path.isfile (f): ly.error (_ (u"%s: Unable to open file") % f) errors += 1 continue