From 5185abc17c92cf16f985a5768654126af226c228 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Mon, 8 Aug 2005 18:08:01 +0100 Subject: [PATCH] Fix the 'import --name' option overriding When the patch was read from a file, the --name option to import didn't override the default name. This patch fixes it. Signed-off-by: Catalin Marinas --- stgit/commands/imprt.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py index 43bd2f1..2bf092c 100644 --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -145,10 +145,13 @@ def func(parser, options, args): if len(args) == 1: filename = args[0] - patch = os.path.basename(filename) - elif options.name: + else: filename = None + + if options.name: patch = options.name + elif filename: + patch = os.path.basename(filename) else: raise CmdException, 'Unkown patch name' -- 2.11.0