diff --git a/twander.py b/twander.py index 24d019f..621aebd 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 2.94 2003/02/10 23:02:51 tundra Exp $" +RCSID = "$Id: twander.py,v 3.0 2003/02/17 20:38:07 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -2382,6 +2382,10 @@ def ExecuteCommand(cmd, name, UseStartDir=FALSE, ResolveVars=FALSE, ResolveBuiltIns=TRUE, SaveUnresolved=FALSE): global UI + # Do nothing on blank commands + if not cmd.strip(): + return + # Work with a copy of the passed command newcmd = cmd @@ -2396,18 +2400,15 @@ # already have their variables dereferenced when that file is # read and parsed.) - if ResolveVars: + if newcmd and ResolveVars: newcmd = ProcessVariables(newcmd, 0 , name) - # A null return value means there was a problem - abort - if not newcmd: - return - # Just dump command if we're debugging if DEBUGLEVEL & DEBUGCMDS: PrintDebug(dCMD, [newcmd,]) + # A null return value means there was a problem - abort # Otherwise,actually execute the command. elif newcmd: