From: Catalin Marinas Date: Fri, 17 Jul 2009 10:57:20 +0000 (+0100) Subject: Fix the import --url command X-Git-Tag: v0.15-rc2~21 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/4a8e79dc3b13208701ca41ac5cfc15bb270238cd Fix the import --url command Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py index 7a806cc..8067beb 100644 --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -267,7 +267,7 @@ def __import_url(url, options): import tempfile if not url: - parser.error('URL argument required') + raise CmdException('URL argument required') patch = os.path.basename(urllib.unquote(url)) filename = os.path.join(tempfile.gettempdir(), patch) @@ -327,7 +327,7 @@ def func(parser, options, args): else: filename = None - if filename: + if not options.url and filename: filename = os.path.abspath(filename) directory.cd_to_topdir()