chiark / gitweb /
Fix the import --url command
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 17 Jul 2009 10:57:20 +0000 (11:57 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 17 Jul 2009 10:57:20 +0000 (11:57 +0100)
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
stgit/commands/imprt.py

index 7a806cce60fd7382848953db6b432fcf7e307100..8067beb11adfaf0ebec52aa5c097eac08b2e8f25 100644 (file)
@@ -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()