]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/tex_copy.py
Pass parameters by reference (performance)
[lyx.git] / lib / scripts / tex_copy.py
index dc6adacee4732ca8507107a6dccf56d0e029d9d7..42ac7a7c4bb7b78294d8f1d1e827523ae4b2d419 100644 (file)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # file tex_copy.py
@@ -54,6 +53,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()