From: Luiz Capitulino <lcapitulino@redhat.com>
To: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/4] qapi-types.py: Fail gracefully if out dir is not specified
Date: Tue, 18 Oct 2011 10:31:33 -0200 [thread overview]
Message-ID: <20111018103133.0835d391@doriath> (raw)
In-Reply-To: <0M4G3X-1Qz4UO2nGl-00rP32@mrelay.perfora.net>
On Mon, 17 Oct 2011 16:27:34 -0500
Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> On Mon, 17 Oct 2011 13:29:36 -0200, Luiz Capitulino <lcapitulino@redhat.com> wrote:
> > Otherwise we get:
> >
> > Traceback (most recent call last):
> > File "./scripts/qapi-types.py", line 183, in <module>
> > os.makedirs(output_dir)
> > File "/usr/lib64/python2.7/os.py", line 157, in makedirs
> > mkdir(name, mode)
> > OSError: [Errno 2] No such file or directory: ''
> >
> > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> > ---
> > scripts/qapi-types.py | 6 +++++-
> > 1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
> > index 8df4b72..4a2ddc4 100644
> > --- a/scripts/qapi-types.py
> > +++ b/scripts/qapi-types.py
> > @@ -178,7 +178,11 @@ if __name__ == '__main__':
> > prefix = a
> > elif o in ("-o", "--output-dir"):
> > output_dir = a
> > -
> > +
> > + if not output_dir:
> > + sys.stdout.write("ouput directory was not specified\n")
> > + sys.exit(1)
> > +
>
> We should probably just set output_dir to os.getcwd() here.
Fair enough.
>
> > c_file = os.path.join(output_dir, prefix + c_file)
> > h_file = os.path.join(output_dir, prefix + h_file)
> >
> > --
> > 1.7.7.rc3
> >
>
next prev parent reply other threads:[~2011-10-18 12:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 15:29 [Qemu-devel] [PATCH v1 0/4]: QAPI: Small fixes for qapi-types.py Luiz Capitulino
2011-10-17 15:29 ` [Qemu-devel] [PATCH 1/4] qapi-types.py: Add a main() like function Luiz Capitulino
2011-10-17 21:19 ` Michael Roth
2011-10-17 15:29 ` [Qemu-devel] [PATCH 2/4] qapi-types.py: Don't build paths by hand Luiz Capitulino
2011-10-17 21:20 ` Michael Roth
2011-10-17 15:29 ` [Qemu-devel] [PATCH 3/4] qapi-types.py: Fail gracefully if out dir is not specified Luiz Capitulino
2011-10-17 21:27 ` Michael Roth
2011-10-18 12:31 ` Luiz Capitulino [this message]
2011-10-17 15:29 ` [Qemu-devel] [PATCH 4/4] qapi-types.py: Drop unused variable Luiz Capitulino
2011-10-17 21:29 ` Michael Roth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111018103133.0835d391@doriath \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).