#NEWLINE# @ classmethod #NEWLINE# def loadOrCreateJobStore( cls , jobStoreString , config = None , **kwargs ) : #NEWLINE# #INDENT# ( region , namePrefix ) = jobStoreString . split ( ':' ) #NEWLINE# if ( not cls . bucketNameRe . match ( namePrefix ) ) : #NEWLINE# #INDENT# raise ValueError ( ( "Invalid name prefix '%s'. Name prefixes must contain only digits, hyphens or lower-case letters and must not start or end in a hyphen." % namePrefix ) ) #NEWLINE# #UNINDENT# if ( len ( namePrefix ) > ( ( cls . maxBucketNameLen - cls . maxNameLen ) - len ( cls . nameSeparator ) ) ) : #NEWLINE# #INDENT# raise ValueError ( ( "Invalid name prefix '%s'. Name prefixes may not be longer than 50 characters." % namePrefix ) ) #NEWLINE# #UNINDENT# if ( '--' in namePrefix ) : #NEWLINE# #INDENT# raise ValueError ( ( "Invalid name prefix '%s'. Name prefixes may not contain %s." % ( config , cls . nameSeparator ) ) ) #NEWLINE# #UNINDENT# return cls ( region , namePrefix , config = config , ** kwargs )