Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)
Returns True if the processes rank is 0

src/p/e/PEATDB-2.3/PEATSA/WebApp/WebScript.py   PEATDB(Download)
		self.connection = None
		self.job = None
		if self.environment.isRoot():
			self.connection = UtilityFunctions.ConnectionFromConfiguration(self.configuration)
			print '[WEBAPP] Connection %s' % self.connection
 
		#Create the output directory
		if self.environment.isRoot() and self.parser.outputDirectory() is not None:
			if not os.path.exists(self.parser.outputDirectory()):
				os.mkdir(self.parser.outputDirectory())
		print "\nError - %s" % data.errorString
		print "Description - %s\n" % data
		if tool is not None and environment.isRoot():
			code = os.path.split(tool.parser.workingDirectory())[1]
			tool.job.setError("No pKa data corresponding to supplied code %s is present" % code, 
		print "\nError - %s" % data.errorString
		print "Description - %s\n" % data
		if tool is not None and environment.isRoot():
			tool.job.setError(data.errorString,data.message)
			tool.job.setState("Finished")	
		#This is raised by sys.exit - check was the arg 0
		if data.message != 0:
			if tool is not None and environment.isRoot():
				tool.job.setError("Encountered an unexpected error - This is likely a bug", 
						"Program exited with exit code %d" % data.message)