当前位置: 首页>>代码示例>>Python>>正文


Python LocalProcess.finish方法代码示例

本文整理汇总了Python中grid_control.utils.process_base.LocalProcess.finish方法的典型用法代码示例。如果您正苦于以下问题:Python LocalProcess.finish方法的具体用法?Python LocalProcess.finish怎么用?Python LocalProcess.finish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在grid_control.utils.process_base.LocalProcess的用法示例。


在下文中一共展示了LocalProcess.finish方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _parseProxy

# 需要导入模块: from grid_control.utils.process_base import LocalProcess [as 别名]
# 或者: from grid_control.utils.process_base.LocalProcess import finish [as 别名]
	def _parseProxy(self, cached = True):
		# Return cached results if requested
		if cached and self._cache:
			return self._cache
		# Call voms-proxy-info and parse results
		proc = LocalProcess(self._infoExec, *self._getProxyArgs())
		(retCode, stdout, stderr) = proc.finish(timeout = 10)
		if (retCode != 0) and not self._ignoreWarning:
			msg = ('%s output:\n%s\n%s\n' % (self._infoExec, stdout, stderr)).replace('\n\n', '\n')
			msg += 'If job submission is still possible, you can set [access] ignore warnings = True\n'
			raise AccessTokenError(msg + '%s failed with return code %d' % (self._infoExec, retCode))
		self._cache = DictFormat(':').parse(stdout)
		return self._cache
开发者ID:Fra-nk,项目名称:grid-control,代码行数:15,代码来源:access_grid.py

示例2: _parseProxy

# 需要导入模块: from grid_control.utils.process_base import LocalProcess [as 别名]
# 或者: from grid_control.utils.process_base.LocalProcess import finish [as 别名]
	def _parseProxy(self, cached = True):
		# Return cached results if requested
		if cached and self._cache:
			return self._cache
		# Call voms-proxy-info and parse results
		args = ['--all']
		if self._proxyPath:
			args.extend(['--file', self._proxyPath])
		proc = LocalProcess(self._infoExec, *args)
		(retCode, stdout, stderr) = proc.finish(timeout = 10)
		if (retCode != 0) and not self._ignoreWarning:
			msg = ('voms-proxy-info output:\n%s\n%s\n' % (stdout, stderr)).replace('\n\n', '\n')
			msg += 'If job submission is still possible, you can set [access] ignore warnings = True\n'
			raise AccessTokenError(msg + 'voms-proxy-info failed with return code %d' % retCode)
		self._cache = utils.DictFormat(':').parse(stdout)
		return self._cache
开发者ID:thomas-mueller,项目名称:grid-control,代码行数:18,代码来源:access.py

示例3: _parse_proxy

# 需要导入模块: from grid_control.utils.process_base import LocalProcess [as 别名]
# 或者: from grid_control.utils.process_base.LocalProcess import finish [as 别名]
	def _parse_proxy(self, cached=True):
		# Return cached results if requested
		if cached and self._cache:
			return self._cache
		# Call voms-proxy-info and parse results
		proc = LocalProcess(self._proxy_info_exec, *self._get_proxy_info_arguments())
		(exit_code, stdout, stderr) = proc.finish(timeout=10)
		if (exit_code != 0) and not self._ignore_warning:
			msg = ('%s output:\n%s\n%s\n' % (self._proxy_info_exec, stdout, stderr)).replace('\n\n', '\n')
			msg += 'If job submission is still possible, you can set [access] ignore warnings = True\n'
			msg += '%s failed with return code %d' % (self._proxy_info_exec, exit_code)
			raise AccessTokenError(msg)
		self._cache = DictFormat(':').parse(stdout)
		if not self._cache:
			msg = 'Unable to parse access token information:\n\t%s\n\t%s\n'
			raise AccessTokenError(msg % (stdout.strip(), stderr.strip()))
		return self._cache
开发者ID:grid-control,项目名称:grid-control,代码行数:19,代码来源:access_grid.py


注:本文中的grid_control.utils.process_base.LocalProcess.finish方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。