bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def updateLFN(f, lfn, newLFN): """ _updateLFN_ Update a LFN. """ if f['LFN'] != lfn: return f['LFN'] = newLFN return
def updateLFN(f, lfn, newLFN): """ _updateLFN_ Update a LFN. """ if f['LFN'] != lfn: return f['LFN'] = newLFN return
455,300
def updateLFN(f, lfn, newLFN): """ _updateLFN_ Update a LFN. """ if f['LFN'] != lfn: return f['LFN'] = newLFN return
def updateLFN(f, lfn, newLFN): """ _updateLFN_ Update a LFN. """ if f['LFN'] != lfn: return f['LFN'] = newLFN return
455,301
def __init__(self): super(ProtocolUberFtp, self).__init__()
def __init__(self): super(ProtocolUberFtp, self).__init__()
455,302
def decodeSubmit(self, jsonString): """ specialized method to decode JSON output of glite-wms-job-submit """ # pre-processing the string before decoding toParse = jsonString.replace( '\n' , ',' ) toParse = self.pattern1.sub(r'{ "\1', toParse[:-1] ) toParse = self.pattern2.sub(r'":"\1', toParse ) toParse = self.pattern...
def def hackTheEnv(prependCommand = ''): """ HaCk ThE eNv *IMPORTANT NOTES* - this hack is necessary if the SYSTEM python under '/usr/bin') and the EXTERNAL python have the same version - the hack is necessary only for CLI which are python(2) script - the hack reverts PATH & LD_LYBRARY_PATH if an external PYTHON is...
455,303
def __init__( self, **args): # call super class init method super(SchedulerGLite, self).__init__(**args) # some initializations self.warnings = [] # typical options self.vo = args.get( "vo", "cms" ) self.service = args.get( "service", "" ) self.config = args.get( "config", "" ) self.delegationId = args.get( "proxyna...
def __init__( self, **args): # call super class init method super(SchedulerGLite, self).__init__(**args) # some initializations self.warnings = [] # typical options self.vo = args.get( "vo", "cms" ) self.service = args.get( "service", "" ) self.config = args.get( "config", "" ) self.delegationId = args.get( "proxyna...
455,304
def postMortem( self, schedulerId, outfile, service): """ perform scheduler logging-info """ command = "glite-wms-job-logging-info -v 3 " + schedulerId + \ " > " + outfile return self.ExecuteCommand( self.proxyString + command )[0]
def postMortem( self, schedulerId, outfile, service): """ perform scheduler logging-info """ command = "glite-wms-job-logging-info -v 3 " + schedulerId + \ " > " + outfile return self.ExecuteCommand( self.proxyString + command )[0]
455,305
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """ # jobId for remapping jobIds = {}
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """ # jobId for remapping jobIds = {}
455,306
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """ # jobId for remapping jobIds = {}
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """ # jobId for remapping jobIds = {}
455,307
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
455,308
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
455,309
def checkMyProxy( self , proxy=None, Time=4, checkRetrieverRenewer=False): """ """ if proxy == None: proxy=self.getUserProxy() ## check the myproxy server valid = True
def checkMyProxy( self , proxy=None, Time=4, checkRetrieverRenewer=False): """ """ if proxy == None: proxy=self.getUserProxy() ## check the myproxy server valid = True
455,310
def splitNgstatOutput(output): """ Split a string of ngstat output into a list with one job per list item. The assumption is that the first line of a job has no indentation, and subsequent lines are indented by at least 1 space. """ jobs = [] s = "" for line in output.split('\n'): if len(line) == 0: continue if lin...
def splitNgstatOutput(output): """ Split a string of ngstat output into a list with one job per list item. The assumption is that the first line of a job has no indentation, and subsequent lines are indented by at least 1 space or start with "This job was only very recently submitted". """ jobs = [] s = "" for line i...
455,311
def splitNgstatOutput(output): """ Split a string of ngstat output into a list with one job per list item. The assumption is that the first line of a job has no indentation, and subsequent lines are indented by at least 1 space. """ jobs = [] s = "" for line in output.split('\n'): if len(line) == 0: continue if lin...
def splitNgstatOutput(output): """ Split a string of ngstat output into a list with one job per list item. The assumption is that the first line of a job has no indentation, and subsequent lines are indented by at least 1 space. """ jobs = [] s = "" for line in output.split('\n'): if len(line) == 0: continue if lin...
455,312
def splitNgstatOutput(output): """ Split a string of ngstat output into a list with one job per list item. The assumption is that the first line of a job has no indentation, and subsequent lines are indented by at least 1 space. """ jobs = [] s = "" for line in output.split('\n'): if len(line) == 0: continue if lin...
def splitNgstatOutput(output): """ Split a string of ngstat output into a list with one job per list item. The assumption is that the first line of a job has no indentation, and subsequent lines are indented by at least 1 space. """ jobs = [] s = "" for line in output.split('\n'): if len(line) == 0: continue if lin...
455,313
def decode(self, job, task, requirements=''): """ prepare scheduler specific job description
def decode(self, job, task, requirements=''): """ prepare scheduler specific job description
455,314
def decode(self, job, task, requirements=''): """ prepare scheduler specific job description
def decode(self, job, task, requirements=''): """ prepare scheduler specific job description
455,315
def decode(self, job, task, requirements=''): """ prepare scheduler specific job description
def decode(self, job, task, requirements=''): """ prepare scheduler specific job description
455,316
def submit(self, task, requirements='', config='', service = ''): """ set up submission parameters and submit uses self.decode()
def submit(self, task, requirements='', config='', service = ''): """ set up submission parameters and submit uses self.decode()
455,317
def query(self, obj, service='', objType='node'): """ Query status and eventually other scheduler related information, and store it in the job.runningJob data structure.
def query(self, obj, service='', objType='node'): """ Query status and eventually other scheduler related information, and store it in the job.runningJob data structure.
455,318
def query(self, obj, service='', objType='node'): """ Query status and eventually other scheduler related information, and store it in the job.runningJob data structure.
def query(self, obj, service='', objType='node'): """ Query status and eventually other scheduler related information, and store it in the job.runningJob data structure.
455,319
def createDir(self, source, opt = "", tout = None): """ _createDir_ """ exitcode = -1 outputs = "" ll = source.getLynk() source_fullpath = ll.split("file://",1)[1] if self.checkExists(source, opt) is False: cmd = "/bin/mkdir -m 775 -p " + opt + " " + source_fullpath exitcode, outputs = self.executeCommand(cmd, timeout...
def createDir(self, source, opt = "", tout = None): """ _createDir_ """ outputs = "" ll = source.getLynk() source_fullpath = ll.split("file://",1)[1] if self.checkExists(source, opt) is False: cmd = "/bin/mkdir -m 775 -p " + opt + " " + source_fullpath exitcode, outputs = self.executeCommand(cmd, timeout = tout) if ex...
455,320
def createDir(self, source, opt = "", tout = None): """ _createDir_ """ exitcode = -1 outputs = "" ll = source.getLynk() source_fullpath = ll.split("file://",1)[1] if self.checkExists(source, opt) is False: cmd = "/bin/mkdir -m 775 -p " + opt + " " + source_fullpath exitcode, outputs = self.executeCommand(cmd, timeout...
def createDir(self, source, opt = "", tout = None): """ _createDir_ """ exitcode = -1 outputs = "" ll = source.getLynk() source_fullpath = ll.split("file://",1)[1] if self.checkExists(source, opt) is False: cmd = "/bin/mkdir -m 775 -p " + opt + " " + source_fullpath exitcode, outputs = self.executeCommand(cmd, timeout...
455,321
def generateJobConfig(self, jobSpecNode): """ _generateJobConfig_
def generateJobConfig(self, jobSpecNode): """ _generateJobConfig_
455,322
def collectionJdlFile ( self, task, requirements='' ): """ build a collection jdl easy to be handled by the wmproxy API interface and gives back the list of input files for a better handling """ # general part for task jdl = "[\n" jdl += 'Type = "collection";\n'
def collectionJdlFile ( self, task, requirements='' ): """ build a collection jdl easy to be handled by the wmproxy API interface and gives back the list of input files for a better handling """ # general part for task jdl = "[\n" jdl += 'Type = "collection";\n'
455,323
def query(self, obj, service='', objType='node'): """ query status of jobs """
def query(self, obj, service='', objType='node'): """ query status of jobs """
455,324
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
455,325
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
455,326
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
455,327
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
455,328
def __init__(self): # call super super(BossliteJsonDecoder, self).__init__() # cache pattern to optimize reg-exp substitution self.pattern1 = re.compile('\{,[\s]*([a-zA-Z0-9_\-\+\=])') self.pattern2 = re.compile(':[\s]([a-zA-Z_\-\+\=])') self.pattern3 = re.compile( '[\s]*([a-zA-Z0-9_\-\+\=]*),[\s]*([a-zA-Z0-9_\-\+\=]...
def __init__(self): # call super super(BossliteJsonDecoder, self).__init__() # cache pattern to optimize reg-exp substitution self.pattern1 = re.compile('([^ \t\n\r\f\v\{\}]+)\s') self.pattern2 = re.compile(':"(["|\{])') self.pattern3 = re.compile('"[\s]*"')
455,329
def decodeSubmit(self, jsonString): """ specialized method to decode JSON output of glite-wms-job-submit """ # pre-processing the string before decoding toParse = jsonString.replace( '\n' , ',' ) toParse = self.pattern1.sub(r'{ "\1', toParse[:-1] ) toParse = self.pattern2.sub(r'":"\1', toParse ) toParse = self.pattern...
def decodeSubmit(self, jsonString): """ specialized method to decode JSON output of glite-wms-job-submit """ # pre-processing the string before decoding toParse = jsonString.replace( '\n' , ' ' ) toParse = self.pattern1.sub(r'"\1"', toParse ) toParse = self.pattern2.sub(r'":\1', toParse ) toParse = self.pattern3.sub(r...
455,330
def decodeSubmit(self, jsonString): """ specialized method to decode JSON output of glite-wms-job-submit """ # pre-processing the string before decoding toParse = jsonString.replace( '\n' , ',' ) toParse = self.pattern1.sub(r'{ "\1', toParse[:-1] ) toParse = self.pattern2.sub(r'":"\1', toParse ) toParse = self.pattern...
def decodeSubmit(self, jsonString): """ specialized method to decode JSON output of glite-wms-job-submit """ # pre-processing the string before decoding toParse = jsonString.replace( '\n' , ',' ) toParse = self.pattern1.sub(r'{ "\1', toParse[:-1] ) toParse = self.pattern2.sub(r'":"\1', toParse ) toParse = self.pattern...
455,331
def __init__( self, **args):
def __init__( self, **args):
455,332
def __init__( self, **args):
def __init__( self, **args):
455,333
def queryLocal(self, schedIdList, objType='node' ) :
def queryLocal(self, schedIdList, objType='node' ) :
455,334
def queryLocal(self, schedIdList, objType='node' ) :
def queryLocal(self, schedIdList, objType='node' ) :
455,335
def kill( self, obj ): """ kill the job instance
def kill( self, obj ): """ kill the job instance
455,336
def modify(self, query): """ execute a query which does not return such as insert/update/delete """
def modify(self, query): """ execute a query which does not return such as insert/update/delete """
455,337
def __init__(self): super(ProtocolLcgUtils, self).__init__() self.options = " --verbose " self.options += " --vo=cms " env = '' source = self.expandEnv('RUNTIME_AREA', '/CacheEnv.sh') if os.path.isfile(str(source).strip()): env = str(source) vars = {\ 'OSG_GRID': '/setup.sh', \ 'GLITE_WMS_LOCATION': '/etc/profile.d/g...
def __init__(self): super(ProtocolLcgUtils, self).__init__() self.options = " --verbose " self.options += " --vo=cms " env = '' source = self.expandEnv('RUNTIME_AREA', '/CacheEnv.sh') if os.path.isfile(str(source).strip()): env = str(source) vars = {\ 'OSG_GRID': '/setup.sh', \ 'GLITE_WMS_LOCATION': '/etc/profile.d/g...
455,338
def __init__( self, **args): # call super class init method super(SchedulerGLite, self).__init__(**args) # some initializations self.warnings = [] # typical options self.vo = args.get( "vo", "cms" ) self.service = args.get( "service", "" ) self.config = args.get( "config", "" ) self.delegationId = args.get( "proxyna...
def self.killThreshold = 100 __init__( self.killThreshold = 100 self, self.killThreshold = 100 **args): self.killThreshold = 100 self.killThreshold = 100 # self.killThreshold = 100 call self.killThreshold = 100 super self.killThreshold = 100 class self.killThreshold = 100 init self.killThreshold = 10...
455,339
def kill( self, obj ): """ kill job """ # the object passed is a job if type(obj) == Job and self.valid( obj.runningJob ): # check for the RunningJob integrity schedIdList = str( obj.runningJob['schedulerId'] ).strip() # the object passed is a Task elif type(obj) == Task : schedIdList = "" for job in obj.jobs: if n...
def kill( self, obj ): """ kill job """ # the object passed is a job if type(obj) == Job and self.valid( obj.runningJob ): # check for the RunningJob integrity schedIdList = str( obj.runningJob['schedulerId'] ).strip() # the object passed is a Task elif type(obj) == Task : for job in obj.jobs: if not self.valid( jo...
455,340
def kill( self, obj ): """ kill job """ # the object passed is a job if type(obj) == Job and self.valid( obj.runningJob ): # check for the RunningJob integrity schedIdList = str( obj.runningJob['schedulerId'] ).strip() # the object passed is a Task elif type(obj) == Task : schedIdList = "" for job in obj.jobs: if n...
def kill( self, obj ): """ kill job """ # the object passed is a job if type(obj) == Job and self.valid( obj.runningJob ): # check for the RunningJob integrity schedIdList = str( obj.runningJob['schedulerId'] ).strip() # the object passed is a Task elif type(obj) == Task : schedIdList = "" for job in obj.jobs: if n...
455,341
def removeQueues(celist): """ Given a list of CEUniqueIDs, return a list of jobmanager contact strings. """ r = re.compile('^(.*:.*/jobmanager-.*?)-(.*)') jmlist = [] for x in celist: m = r.match(x) if m: item = m.groups()[0] if (jmlist.count(item) == 0): jmlist.append(item) return jmlist
def removeQueues(celist): """ Given a list of CEUniqueIDs, return a list of jobmanager contact strings. """ if DEBUG > 1: print 'removeQueues: input %s' % celist r = re.compile('^(.*:.*/(jobmanager|nordugrid|cream)-.*?)-(.*)') jmlist = [] for x in celist: m = r.match(x) if m: item = m.groups()[0] if (jmlist.count(ite...
455,342
def __init__(self): # call super super(BossliteJsonDecoder, self).__init__() # cache pattern to optimize reg-exp substitution self.pattern1 = re.compile('\{,[\s]*([a-zA-Z0-9_\-])') self.pattern2 = re.compile(':[\s]([a-zA-Z_\-])') self.pattern3 = re.compile( '[\s]*([a-zA-Z0-9_\-]*),[\s]*([a-zA-Z0-9_\-]*)"') self.patte...
def __init__(self): # call super super(BossliteJsonDecoder, self).__init__() # cache pattern to optimize reg-exp substitution self.pattern1 = re.compile('\{,[\s]*([a-zA-Z0-9_\-\+\=])') self.pattern2 = re.compile(':[\s]([a-zA-Z_\-\+\=])') self.pattern3 = re.compile( '[\s]*([a-zA-Z0-9_\-]*),[\s]*([a-zA-Z0-9_\-]*)"') se...
455,343
def __init__(self): # call super super(BossliteJsonDecoder, self).__init__() # cache pattern to optimize reg-exp substitution self.pattern1 = re.compile('\{,[\s]*([a-zA-Z0-9_\-])') self.pattern2 = re.compile(':[\s]([a-zA-Z_\-])') self.pattern3 = re.compile( '[\s]*([a-zA-Z0-9_\-]*),[\s]*([a-zA-Z0-9_\-]*)"') self.patte...
def __init__(self): # call super super(BossliteJsonDecoder, self).__init__() # cache pattern to optimize reg-exp substitution self.pattern1 = re.compile('\{,[\s]*([a-zA-Z0-9_\-])') self.pattern2 = re.compile(':[\s]([a-zA-Z_\-])') self.pattern3 = re.compile( '[\s]*([a-zA-Z0-9_\-\+\=]*),[\s]*([a-zA-Z0-9_\-\+\=]*)"') se...
455,344
def __init__(self): # call super super(BossliteJsonDecoder, self).__init__() # cache pattern to optimize reg-exp substitution self.pattern1 = re.compile('\{,[\s]*([a-zA-Z0-9_\-])') self.pattern2 = re.compile(':[\s]([a-zA-Z_\-])') self.pattern3 = re.compile( '[\s]*([a-zA-Z0-9_\-]*),[\s]*([a-zA-Z0-9_\-]*)"') self.patte...
def __init__(self): # call super super(BossliteJsonDecoder, self).__init__() # cache pattern to optimize reg-exp substitution self.pattern1 = re.compile('\{,[\s]*([a-zA-Z0-9_\-])') self.pattern2 = re.compile(':[\s]([a-zA-Z_\-])') self.pattern3 = re.compile( '[\s]*([a-zA-Z0-9_\-]*),[\s]*([a-zA-Z0-9_\-]*)"') self.patte...
455,345
def decodeSubmit(self, jsonString): """ specialized method to decode JSON output of glite-wms-job-submit """ # pre-processing the string before decoding toParse = jsonString.replace( '\n' , ',' ) toParse = self.pattern1.sub(r'{ "\1', toParse[:-1] ) toParse = self.pattern2.sub(r'":"\1', toParse ) toParse = self.pattern...
def decodeSubmit(self, jsonString): """ specialized method to decode JSON output of glite-wms-job-submit """ # pre-processing the string before decoding toParse = jsonString.replace( '\n' , ',' ) toParse = self.pattern1.sub(r'{ "\1', toParse[:-1] ) toParse = self.pattern2.sub(r'":"\1', toParse ) toParse = self.pattern...
455,346
def decodeSubmit(self, jsonString): """ specialized method to decode JSON output of glite-wms-job-submit """ # pre-processing the string before decoding toParse = jsonString.replace( '\n' , ',' ) toParse = self.pattern1.sub(r'{ "\1', toParse[:-1] ) toParse = self.pattern2.sub(r'":"\1', toParse ) toParse = self.pattern...
def decodeSubmit(self, jsonString): """ specialized method to decode JSON output of glite-wms-job-submit """ # pre-processing the string before decoding toParse = jsonString.replace( '\n' , ',' ) toParse = self.pattern1.sub(r'{ "\1', toParse[:-1] ) toParse = self.pattern2.sub(r'":"\1', toParse ) toParse = self.pattern...
455,347
def collectionJdlFile ( self, task, requirements='' ): """ build a collection jdl easy to be handled by the wmproxy API interface and gives back the list of input files for a better handling """ # general part for task jdl = "[\n" jdl += 'Type = "collection";\n'
def collectionJdlFile ( self, task, requirements='' ): """ build a collection jdl easy to be handled by the wmproxy API interface and gives back the list of input files for a better handling """ # general part for task jdl = "[\n" jdl += 'Type = "collection";\n'
455,348
def collectionJdlFile ( self, task, requirements='' ): """ build a collection jdl easy to be handled by the wmproxy API interface and gives back the list of input files for a better handling """ # general part for task jdl = "[\n" jdl += 'Type = "collection";\n'
def collectionJdlFile ( self, task, requirements='' ): """ build a collection jdl easy to be handled by the wmproxy API interface and gives back the list of input files for a better handling """ # general part for task jdl = "[\n" jdl += 'Type = "collection";\n'
455,349
def getFileInfo(self, source, token = None, opt = ""): """ rfdir
def getFileInfo(self, source, token = None, opt = ""): """ rfdir
455,350
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """
455,351
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """
455,352
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """
455,353
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information """
455,354
def getSoftwareAndArch(host_list, software, arch, bdii='exp-bdii.cern.ch'): """ Given a list of CEs, return only those that match a given software and architecture tag """ generateMaps(host_list, bdii) results_list = [] if (software): software = 'VO-cms-' + software else: software = '*' if (arch): arch = 'VO-cms-' + ...
def getSoftwareAndArch(host_list, software, arch, bdii='exp-bdii.cern.ch'): """ Given a list of CEs, return only those that match a given software and architecture tag """ generateMaps(host_list, bdii) results_list = [] if (software): software = 'VO-cms-' + software else: software = '*' if (arch): arch = 'VO-cms-' + ...
455,355
def joinPath(self, path, name): """ joining files with base directory """ if path is None or path == '' : return name
def joinPath(self, path, name): """ joining files with base directory """ if path is None or path == '' : return name
455,356
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information It may use single 'node' scheduler id or bulk id for association """ if type(obj) != Task : raise SchedulerError('wrong argument type', str( type(obj) ))
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information It may use single 'node' scheduler id or bulk id for association """ if type(obj) != Task : raise SchedulerError('wrong argument type', str( type(obj) ))
455,357
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information It may use single 'node' scheduler id or bulk id for association """ if type(obj) != Task : raise SchedulerError('wrong argument type', str( type(obj) ))
def query(self, obj, service='', objType='node') : """ query status and eventually other scheduler related information It may use single 'node' scheduler id or bulk id for association """ if type(obj) != Task : raise SchedulerError('wrong argument type', str( type(obj) ))
455,358
def __init__( self, **args): super(SchedulerPbs, self).__init__(**args) self.jobScriptDir=args['jobScriptDir'] self.jobResDir=args['jobResDir'] self.queue=args['queue']
def __init__( self, **args): super(SchedulerPbs, self).__init__(**args) self.jobScriptDir=args['jobScriptDir'] self.jobResDir=args['jobResDir'] self.queue=args['queue']
455,359
def submitJob ( self, conn, job, task=None, requirements=''): """ Need to copy the inputsandbox to WN before submitting a job"""
def submitJob ( self, conn, job, task=None, requirements=''): """ Need to copy the inputsandbox to WN before submitting a job"""
455,360
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
455,361
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
455,362
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
455,363
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
455,364
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
455,365
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json ...
455,366
def dumps(self, myString): """ the same interface as simplejson ... """ tmp = str(myString) tmp = tmp.replace('\'','"') tmp = tmp.replace('None','null') return tmp
def tmp = tmp.replace('doesn"t',"doesn't") dumps(self, tmp = tmp.replace('doesn"t',"doesn't") myString): tmp = tmp.replace('doesn"t',"doesn't") """ tmp = tmp.replace('doesn"t',"doesn't") the tmp = tmp.replace('doesn"t',"doesn't") same tmp = tmp.replace('doesn"t',"doesn't") interface tmp = tmp.replac...
455,367
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
455,368
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
455,369
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
def executeCommand(self, command, timeout=None , stderr=False): """ _executeCommand_
455,370
def main(): """ __main__ """ # load ad-hoc JSON encoder if simplejson is not present try : import simplejson as json except: json = myJSONEncoder() # parse options try: opts, args = getopt.getopt(sys.argv[1:], "", ["help", "parentId=", "jobId="]) except getopt.GetoptError, err: print usage() sys.exit(1) inputFile = ...
def main(): """ __main__ """ # load ad-hoc JSON encoder if simplejson is not present try : import simplejson as json except: json = myJSONEncoder() # parse options try: opts, args = getopt.getopt(sys.argv[1:], "", ["help", "parentId=", "jobId="]) except getopt.GetoptError, err: print usage() sys.exit(1) inputFile = ...
455,371
def main(): """ __main__ """ # load ad-hoc JSON encoder if simplejson is not present try : import simplejson as json except: json = myJSONEncoder() # parse options try: opts, args = getopt.getopt(sys.argv[1:], "", ["help", "parentId=", "jobId="]) except getopt.GetoptError, err: print usage() sys.exit(1) inputFile = ...
def main(): """ __main__ """ # load ad-hoc JSON encoder if simplejson is not present try : import simplejson as json except: json = myJSONEncoder() # parse options try: opts, args = getopt.getopt(sys.argv[1:], "", ["help", "parentId=", "jobId="]) except getopt.GetoptError, err: print usage() sys.exit(1) inputFile = ...
455,372
def updateLFN(f, lfn, newLFN): """ _updateLFN_ Update a LFN. """ if f['LFN'] != lfn: return f['LFN'] = newLFN return
def updateLFN(f, lfn, newLFN): """ _updateLFN_ Update a LFN. """ if f['LFN'] != lfn: return f['LFN'] = newLFN return
455,373
def updateLFN(f, lfn, newLFN): """ _updateLFN_ Update a LFN. """ if f['LFN'] != lfn: return f['LFN'] = newLFN return
def updateLFN(f, lfn, newLFN): """ _updateLFN_ Update a LFN. """ if f['LFN'] != lfn: return f['LFN'] = newLFN return
455,374
def submit( self, obj, requirements='', config ='', service='' ): """ submit a jdl to glite ends with a call to retrieve wms and job,gridid asssociation """
def for job in obj.jobs: if job['name'].count('.'): returned_name = job['name'].replace('.', '_') returnMap[job['name']] = returnMap.pop(returned_name) submit( for job in obj.jobs: if job['name'].count('.'): returned_name = job['name'].replace('.', '_') returnMap[job['name']] = returnMap.pop(returned_name) self, f...
455,375
def submit( self, obj, requirements='', config ='', service='' ): """ submit a jdl to glite ends with a call to retrieve wms and job,gridid asssociation """
def if obj['name'].count('.'): returned_name = obj['name'].replace('.', '_') returnMap[obj['name']] = returnMap.pop(returned_name) submit( if obj['name'].count('.'): returned_name = obj['name'].replace('.', '_') returnMap[obj['name']] = returnMap.pop(returned_name) self, if obj['name'].count('.'): returned_name = obj...
455,376
def destroyCredential(self, userKerb): """ """ if userKerb == None: msg = "Error no valid user kerberos to remove " raise Exception(msg)
def destroyCredential(self, userKerb): """ """ if userKerb == None: msg = "Error no valid user kerberos to remove " raise Exception(msg)
455,377
def __unicode__(self): return self.name
def __unicode__(self): return self.name
455,378
def find_organization(self, row): # see if there's a product with the normalized name org = Organization.objects.filter(name__iexact=normalize_org_name(row.get('Source Name'))) if not org.count(): # see if there's a product with the URL urlparts = urlsplit(row.get('Home Page URL', '')) if urlparts: netloc = urlparts.ne...
def find_organization(self, row): # see if there's a product with the normalized name org = Organization.objects.filter(name__iexact=normalize_org_name(row.get('Source Name'))) if not org.count(): # see if there's a product with the URL urlparts = urlsplit(row.get('Home Page URL', '')) if urlparts: netloc = urlparts.ne...
455,379
def find_organization(self, row): # see if there's a product with the normalized name org = Organization.objects.filter(name__iexact=normalize_org_name(row.get('Source Name'))) if not org.count(): # see if there's a product with the URL urlparts = urlsplit(row.get('Home Page URL', '')) if urlparts: netloc = urlparts.ne...
def find_organization(self, row): # see if there's a product with the normalized name org = Organization.objects.filter(name__iexact=normalize_org_name(row.get('Source Name'))) if not org.count(): # see if there's a product with the URL urlparts = urlsplit(row.get('Home Page URL', '')) if urlparts: netloc = urlparts.ne...
455,380
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <span class="gray">Title original original, 90 мин</span> \ <span class="gray">США, <i class="director">реж. <a class="lined" href="/level/4/people/28795/">Эрик Бросс</a></i> \ <br />(триллер, комедия) \ </span> ...
455,381
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,382
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,383
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,384
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,385
def get_posters(self): title = self.title.replace(' ', '-') if self.title else 'Title' return ['http://st3.kinopoisk.ru/im/poster/1/1/1/kinopoisk.ru-%s-%d.jpg' % (title, id) for id in self.posters]
def get_posters(self): title = self.title.replace(' ', '-') if self.title else 'Title' return ['http://st3.kinopoisk.ru/im/poster/1/1/1/kinopoisk.ru-%s-%d.jpg' % (title, id) for id in self.posters]
455,386
def search(self, query): url, params = self.get_url_with_params(query) request = UrlRequest(url, params) content = request.read() # request is redirected to main page of objec if request.is_redirected: object = self.kinopoisk_object() object.parse('main_page', content) return [object] else: content_results = content[co...
def search(self, query): url, params = self.get_url_with_params(query) request = UrlRequest(url, params) content = request.read() # request is redirected to main page of objec if request.is_redirected: object = self.kinopoisk_object() object.parse('main_page', content) return [object] else: content_results = content[co...
455,387
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,388
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,389
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,390
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,391
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,392
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,393
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, ...
455,394
def doPart(self, irc, msg): if not msg.args[1].startswith('requested by'): return
def doPart(self, irc, msg): if len(msg.args) < 2 or not msg.args[1].startswith('requested by'): return
455,395
def beginswith(text, strings): for string in strings: if text.startswith(string): return True return False
def beginswith(text, strings): for string in strings: if text.startswith(string): return True return False
455,396
def beginswith(text, strings): for string in strings: if text.startswith(string): return True return False
def beginswith(text, strings): for string in strings: if text.startswith(string): return True return False
455,397
def configure(advanced): from supybot.questions import yn, something, anything, output from supybot.utils.str import format import sqlite import re Encyclopedia = conf.registerPlugin('Encyclopedia', True) enabled = yn("Enable Encyclopedia for all channels?", default=Encyclopedia.enabled._default) if advanced: datadir ...
def configure(advanced): from supybot.questions import yn, something, anything, output from supybot.utils.str import format import sqlite import re Encyclopedia = conf.registerPlugin('Encyclopedia', True) enabled = yn("Enable Encyclopedia for all channels?", default=Encyclopedia.enabled._default) if advanced: datadir ...
455,398
def configure(advanced): from supybot.questions import yn, something, anything, output from supybot.utils.str import format import sqlite import re Encyclopedia = conf.registerPlugin('Encyclopedia', True) enabled = yn("Enable Encyclopedia for all channels?", default=Encyclopedia.enabled._default) if advanced: datadir ...
def configure(advanced): from supybot.questions import yn, something, anything, output from supybot.utils.str import format import sqlite import re Encyclopedia = conf.registerPlugin('Encyclopedia', True) enabled = yn("Enable Encyclopedia for all channels?", default=Encyclopedia.enabled._default) if advanced: datadir ...
455,399