Author: jamatos Date: Tue Mar 15 19:17:42 2011 New Revision: 37937 URL: http://www.lyx.org/trac/changeset/37937
Log: Do not crash if the input file does not exist, instead warn and exit (fixes https://bugzilla.redhat.com/show_bug.cgi?id=595618) Modified: lyx-devel/trunk/lib/scripts/tex_copy.py Modified: lyx-devel/trunk/lib/scripts/tex_copy.py ============================================================================== --- lyx-devel/trunk/lib/scripts/tex_copy.py Tue Mar 15 14:36:48 2011 (r37936) +++ lyx-devel/trunk/lib/scripts/tex_copy.py Tue Mar 15 19:17:42 2011 (r37937) @@ -54,6 +54,8 @@ 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()
