mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 23:01:02 +00:00
qapi: Generators crash when --output-dir isn't given, fix
Backports commit c4f498fe8532cdacc609262b104322911108df54 from qemu
This commit is contained in:
parent
741783073f
commit
809b439562
|
@ -1032,11 +1032,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 a new issue