]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/tex_copy.py
Allow Insetlayout for Branch inset (#8106).
[lyx.git] / lib / scripts / tex_copy.py
index c91e298cabd69d6bc0707dcd929271e12facc3d6..224406840c34c0d0a2e3194fe32f7480247604c9 100644 (file)
@@ -11,7 +11,7 @@
 # Full author contact details are available in file CREDITS
 
 # Usage:
-# tex_copy.py from file> <to file> <latex name>
+# tex_copy.py <from file> <to file> <latex name>
 
 # This script will copy a file <from file> to <to file>.
 # <to file> is no exact copy of <from file>, but any occurence of <basename>
@@ -54,6 +54,8 @@ def main(argv):
     latex_base, latex_ext = os.path.splitext(latex_file)
 
     # Read the input file and write the output file
+    if(not os.path.isfile(abs_from_file)):
+         error("%s is not a valid file.\n" % abs_from_file)
     from_file = open(abs_from_file, 'rb')
     to_file = open(abs_to_file, 'wb')
     lines = from_file.readlines()