mirror of https://github.com/xemu-project/xemu.git
qapi: Generators crash when --output-dir isn't given, fix
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
94a3f0af38
commit
c4f498fe85
|
@ -1035,11 +1035,12 @@ def open_output(output_dir, do_c, do_h, prefix, c_file, h_file,
|
||||||
c_file = output_dir + prefix + c_file
|
c_file = output_dir + prefix + c_file
|
||||||
h_file = output_dir + prefix + h_file
|
h_file = output_dir + prefix + h_file
|
||||||
|
|
||||||
try:
|
if output_dir:
|
||||||
os.makedirs(output_dir)
|
try:
|
||||||
except os.error, e:
|
os.makedirs(output_dir)
|
||||||
if e.errno != errno.EEXIST:
|
except os.error, e:
|
||||||
raise
|
if e.errno != errno.EEXIST:
|
||||||
|
raise
|
||||||
|
|
||||||
def maybe_open(really, name, opt):
|
def maybe_open(really, name, opt):
|
||||||
if really:
|
if really:
|
||||||
|
|
Loading…
Reference in New Issue