Fix open empty file
This commit is contained in:
parent
121b8fe4b0
commit
a152af6bac
5
src/jam
5
src/jam
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user