summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-30 11:26:02 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-30 11:26:02 -0400
commitbc49e71c73eb3593705a7332bb5352825def88b3 (patch)
treec3673633615c48534c368c4f64685d6cce50cd22
parent81ad085cffc8f8af7fb7884bcc5db6fcede09df6 (diff)
parent6ec2af3bc9f0fd82f80b91a7d38540fa930291f9 (diff)
downloadcmd2-git-bc49e71c73eb3593705a7332bb5352825def88b3.tar.gz
Merge branch 'master' into transcript_fixes
-rw-r--r--CHANGELOG.md2
-rw-r--r--cmd2/cmd2.py15
2 files changed, 6 insertions, 11 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d2d0adec..0e3d704d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## 0.9.5 (September TBD, 2018)
+## 0.9.5 (October TBD, 2018)
* Bug Fixes
* Fixed bug where ``get_all_commands`` could return non-callable attributes
* Fixed bug where **alias** command was dropping quotes around arguments
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index dec0a04d..79d3c80a 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -2216,13 +2216,11 @@ class Cmd(cmd.Cmd):
args.name = utils.strip_quotes(args.name)
valid, errmsg = self.statement_parser.is_valid_command(args.name)
if not valid:
- errmsg = "Invalid alias name: {}".format(errmsg)
- self.perror(errmsg, traceback_war=False)
+ self.perror("Invalid alias name: {}".format(errmsg), traceback_war=False)
return
if args.name in self.macros:
- errmsg = "Alias cannot have the same name as a macro"
- self.perror(errmsg, traceback_war=False)
+ self.perror("Alias cannot have the same name as a macro", traceback_war=False)
return
utils.unquote_redirection_tokens(args.command_args)
@@ -2353,18 +2351,15 @@ class Cmd(cmd.Cmd):
args.name = utils.strip_quotes(args.name)
valid, errmsg = self.statement_parser.is_valid_command(args.name)
if not valid:
- errmsg = "Invalid macro name: {}".format(errmsg)
- self.perror(errmsg, traceback_war=False)
+ self.perror("Invalid macro name: {}".format(errmsg), traceback_war=False)
return
if args.name in self.get_all_commands():
- errmsg = "Macro cannot have the same name as a command"
- self.perror(errmsg, traceback_war=False)
+ self.perror("Macro cannot have the same name as a command", traceback_war=False)
return
if args.name in self.aliases:
- errmsg = "Macro cannot have the same name as an alias"
- self.perror(errmsg, traceback_war=False)
+ self.perror("Macro cannot have the same name as an alias", traceback_war=False)
return
utils.unquote_redirection_tokens(args.command_args)