From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXrsK-0004Jc-E7 for qemu-devel@nongnu.org; Fri, 04 Sep 2015 10:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXrsG-0001by-OZ for qemu-devel@nongnu.org; Fri, 04 Sep 2015 10:21:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXrsG-0001aX-4r for qemu-devel@nongnu.org; Fri, 04 Sep 2015 10:21:52 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id BA706461E0 for ; Fri, 4 Sep 2015 14:21:51 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t84ELnRc004822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 4 Sep 2015 10:21:51 -0400 From: Markus Armbruster Date: Fri, 4 Sep 2015 16:21:40 +0200 Message-Id: <1441376500-14784-34-git-send-email-armbru@redhat.com> In-Reply-To: <1441376500-14784-1-git-send-email-armbru@redhat.com> References: <1441376500-14784-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PULL 33/33] qapi: Generators crash when --output-dir isn't given, fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index ac0e45e..817d824 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -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 h_file = output_dir + prefix + h_file - try: - os.makedirs(output_dir) - except os.error, e: - if e.errno != errno.EEXIST: - raise + if output_dir: + try: + os.makedirs(output_dir) + except os.error, e: + if e.errno != errno.EEXIST: + raise def maybe_open(really, name, opt): if really: -- 2.4.3