changeset 25:c516d8593c0e

print value when the request name is not a runnable command
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 02 Apr 2011 19:56:08 +0800
parents 81cbe3a35e18
children 77ed60603436
files shada/comm.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/shada/comm.py	Fri Apr 01 19:26:24 2011 +0800
+++ b/shada/comm.py	Sat Apr 02 19:56:08 2011 +0800
@@ -83,7 +83,9 @@
             raise ValueError, 'invalid command name %s' % (callable_name)
         
         if not callable(cmd):
-            raise ValueError, 'invalid command name %s' % (callable_name)
+            self.send(str(cmd) + '\n')
+            self.exit(0)
+            return
         
         calling_gen = cmd(args, env, self)
         if calling_gen == None: