check the existance of 'source_rpm' before using it
authorZhang Qiang <qiang.z.zhang@intel.com>
Tue, 9 Oct 2012 07:47:13 +0000 (15:47 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Tue, 9 Oct 2012 07:47:13 +0000 (15:47 +0800)
Change-Id: I132dde430d123191b7ebe207eafbce8175ff079b

gitbuildsys/cmd_export.py

index b8a14fb..966d3a8 100644 (file)
@@ -106,7 +106,7 @@ def create_gbp_export_args(repo, commit, export_dir, tmp_dir, spec, args,
         if repo.has_branch("pristine-tar"):
             argv.extend(["--git-pristine-tar"])
 
-    if args.source_rpm:
+    if 'source_rpm' in args and args.source_rpm:
         argv.extend(['--git-builder=rpmbuild',
                      '--git-rpmbuild-builddir=.',
                      '--git-rpmbuild-builddir=.',