incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1294728 - in /incubator/tashi/trunk: ./ src/tashi/client/tashi-client.py
Date Tue, 28 Feb 2012 16:49:51 GMT
Author: stroucki
Date: Tue Feb 28 16:49:51 2012
New Revision: 1294728

URL: http://svn.apache.org/viewvc?rev=1294728&view=rev
Log:
tashi-client: resolve TASHI-10

Modified:
    incubator/tashi/trunk/   (props changed)
    incubator/tashi/trunk/src/tashi/client/tashi-client.py

Propchange: incubator/tashi/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 28 16:49:51 2012
@@ -5,6 +5,7 @@
 /incubator/tashi/branches/stroucki-accounting/branches/stroucki-accounting:1221525-1235607
 /incubator/tashi/branches/stroucki-irpbugs:1245857-1292894
 /incubator/tashi/branches/stroucki-slotsbug:1244839-1245041
+/incubator/tashi/branches/stroucki-tashi10:1294393-1294727
 /incubator/tashi/branches/stroucki-tashi11:1294393-1294415
 /incubator/tashi/branches/stroucki-tashi8:1294393-1294427
 /incubator/tashi/branches/zoni-dev/trunk:1034098-1177646

Modified: incubator/tashi/trunk/src/tashi/client/tashi-client.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/client/tashi-client.py?rev=1294728&r1=1294727&r2=1294728&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/client/tashi-client.py (original)
+++ incubator/tashi/trunk/src/tashi/client/tashi-client.py Tue Feb 28 16:49:51 2012
@@ -582,12 +582,18 @@ def main():
 		
 		f = getattr(client, function, None)
 
-		if (f is None):
-			f = extraViews[function][0]
-		if (function in convertArgs):
-			fargs = eval(convertArgs[function], globals(), vals)
-		else:
-			fargs = []
+		try:
+			if (f is None):
+				f = extraViews[function][0]
+			if (function in convertArgs):
+				fargs = eval(convertArgs[function], globals(), vals)
+			else:
+				fargs = []
+		except NameError, e:
+			print e
+			print "Please run tashi-client --examples for syntax information"
+			sys.exit(-1)
+
 		res = f(*fargs)
 		if (res != None):
 			keys = extraViews.get(function, (None, None))[1]



Mime
View raw message