[LyX/master] ext_copy: bug when creating the error string.

Thibaut Cuvelier tcuvelier at lyx.org
Thu Feb 4 19:34:55 UTC 2021


commit 0b56495e48437bec97117de8c6ac1825a8cf3fb1
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Thu Jan 28 02:32:51 2021 +0100

    ext_copy: bug when creating the error string.
    
    Wrong usage of % syntax.
---
 lib/scripts/ext_copy.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/scripts/ext_copy.py b/lib/scripts/ext_copy.py
index 57fd441..2d4b386 100644
--- a/lib/scripts/ext_copy.py
+++ b/lib/scripts/ext_copy.py
@@ -30,7 +30,7 @@ from lyxpreview_tools import error
 
 def usage(prog_name):
     msg = "Usage: %s [-d] [-e extensions] [-t target extension] from_file to_file"
-    return  msg % prog_name
+    return msg % prog_name
 
 
 def main(argv):
@@ -53,7 +53,7 @@ def main(argv):
       error(usage(progname))
     abs_from_file = args[0]
     if not os.path.isabs(abs_from_file):
-      error("%s is not an absolute file name.\n%s" % abs_from_file, usage(progname))
+      error("%s is not an absolute file name.\n%s" % (abs_from_file, usage(progname)))
     from_dir = os.path.dirname(abs_from_file)
 
     # output directory
@@ -64,7 +64,7 @@ def main(argv):
       if targext != '.':
         to_dir += "." + targext
       if not os.path.isabs(to_dir):
-        error("%s is not an absolute file name.\n%s" % to_dir, usage(progname))
+        error("%s is not an absolute file name.\n%s" % (to_dir, usage(progname)))
 
     if not copy_all(from_dir, to_dir, exts):
       # some kind of failure


More information about the lyx-cvs mailing list