Fix open empty file

This commit is contained in:
Ian Jauslin 2024-02-24 10:44:11 -05:00
parent 121b8fe4b0
commit a152af6bac
1 changed files with 2 additions and 3 deletions

View File

@ -61,10 +61,10 @@ def read_cli():
else:
openfile=arg
(ret,message)=filecheck.check_edit(openfile)
preread_conf(openfile)
if ret<0:
print(message,file=sys.stderr)
exit(-1)
preread_conf(openfile)
# read command line arguments from configuration file
def preread_conf(file):
@ -72,8 +72,7 @@ def preread_conf(file):
try:
ff=open(file,"r")
except:
print("error: could not read file '"+file+"' (this should not happen and is probably a bug)", file=sys.stderr)
exit(-1)
return
# counter
i=0