incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rg...@apache.org
Subject svn commit: r1150514 - /incubator/tashi/branches/zoni-dev/trunk/src/zoni/extra/util.py
Date Sun, 24 Jul 2011 23:01:13 GMT
Author: rgass
Date: Sun Jul 24 23:01:13 2011
New Revision: 1150514

URL: http://svn.apache.org/viewvc?rev=1150514&view=rev
Log:
Make createDir return and remove the check for error num and just print it.

Modified:
    incubator/tashi/branches/zoni-dev/trunk/src/zoni/extra/util.py

Modified: incubator/tashi/branches/zoni-dev/trunk/src/zoni/extra/util.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/zoni-dev/trunk/src/zoni/extra/util.py?rev=1150514&r1=1150513&r2=1150514&view=diff
==============================================================================
--- incubator/tashi/branches/zoni-dev/trunk/src/zoni/extra/util.py (original)
+++ incubator/tashi/branches/zoni-dev/trunk/src/zoni/extra/util.py Sun Jul 24 23:01:13 2011
@@ -135,6 +135,7 @@ def checkSuper(f):
 			exit()
 		return res
 	myF.__name__ = f.__name__
+	
 	return myF
 
 
@@ -166,10 +167,11 @@ def createDir(dirName, checkexists=None)
 		os.mkdir(dirName, 0755)
 		print "	Creating directory " + dirName
 	except (OSError, Exception), e:
-		if e.errno == 17:
-			print "	" + e.args[1] + ": " + dirName
-		else:
-			print "	" + e.args[1] + ": " + dirName
+		print "	" + e.args[1] + ": " + dirName
+		return 0
+
+	return 1
+
 
 
 def validIp(ip):



Mime
View raw message