bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def _find_inconsistent_information(db, options): fileInconsistent = open(options.inconsistent, 'w') isEmpty = True cursor = db.cursor() cursorMachine = db.cursor() cursor2 = db.cursor() cursor3 = db.cursor() cursor.execute("SELECT auid, auname FROM burp WHERE rundate >= '" + str(options.reportdate...
def _find_inconsistent_information(db, options): fileInconsistent = open(options.inconsistent, 'w') isEmpty = True cursor = db.cursor() cursorMachine = db.cursor() cursor2 = db.cursor() cursor3 = db.cursor() cursor.execute("SELECT auid, auname FROM burp WHERE rundate >= '" + str(options.reportdate...
455,600
def _find_inconsistent_information(db, options): fileInconsistent = open(options.inconsistent, 'w') isEmpty = True cursor = db.cursor() cursorMachine = db.cursor() cursor2 = db.cursor() cursor3 = db.cursor() cursor.execute("SELECT auid, auname FROM burp WHERE rundate >= '" + str(options.reportdate...
def _find_inconsistent_information(db, options): fileInconsistent = open(options.inconsistent, 'w') isEmpty = True cursor = db.cursor() cursorMachine = db.cursor() cursor2 = db.cursor() cursor3 = db.cursor() cursor.execute("SELECT auid, auname FROM burp WHERE rundate >= '" + str(options.reportdate...
455,601
def _find_inconsistent_information(db, options): fileInconsistent = open(options.inconsistent, 'w') isEmpty = True cursor = db.cursor() cursorMachine = db.cursor() cursor2 = db.cursor() cursor3 = db.cursor() cursor.execute("SELECT auid, auname FROM burp WHERE rundate >= '" + str(options.reportdate...
def _find_inconsistent_information(db, options): fileInconsistent = open(options.inconsistent, 'w') isEmpty = True cursor = db.cursor() cursorMachine = db.cursor() cursor2 = db.cursor() cursor3 = db.cursor() cursor.execute("SELECT auid, auname FROM burp WHERE rundate >= '" + str(options.reportdate...
455,602
def _find_inconsistent_information(db, options): fileInconsistent = open(options.inconsistent, 'w') isEmpty = True cursor = db.cursor() cursorMachine = db.cursor() cursor2 = db.cursor() cursor3 = db.cursor() cursor.execute("SELECT auid, auname FROM burp WHERE rundate >= '" + str(options.reportdate...
def _find_inconsistent_information(db, options): fileInconsistent = open(options.inconsistent, 'w') isEmpty = True cursor = db.cursor() cursorMachine = db.cursor() cursor2 = db.cursor() cursor3 = db.cursor() cursor.execute("SELECT auid, auname FROM burp WHERE rundate >= '" + str(options.reportdate...
455,603
def _article_report(client, db, options): auids, auname = _get_auids(client) host, port = options.host.split(':',1) auyear = {} austatus = {} aucreated = {} aulastcrawlresult = {} aucontentsize = {} audisksize = {} aurepository = {} auarticles = {} cursor = db.cursor() cursorStarted = db.cursor() cursorStarted.execute...
def _article_report(client, db, options): auids, auname = _get_auids(client) host, port = options.host.split(':',1) auyear = {} austatus = {} aucreated = {} aulastcrawlresult = {} aucontentsize = {} audisksize = {} aurepository = {} auarticles = {} cursor = db.cursor() cursorStarted = db.cursor() cursorStarted.execute...
455,604
def _article_report(client, db, options): auids, auname = _get_auids(client) host, port = options.host.split(':',1) auyear = {} austatus = {} aucreated = {} aulastcrawlresult = {} aucontentsize = {} audisksize = {} aurepository = {} auarticles = {} cursor = db.cursor() cursorStarted = db.cursor() cursorStarted.execute...
def _article_report(client, db, options): auids, auname = _get_auids(client) host, port = options.host.split(':',1) auyear = {} austatus = {} aucreated = {} aulastcrawlresult = {} aucontentsize = {} audisksize = {} aurepository = {} auarticles = {} cursor = db.cursor() cursorStarted = db.cursor() cursorStarted.execute...
455,605
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
455,606
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
455,607
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
455,608
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
455,609
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
455,610
def __synonym_list(opt, str, val, par): if getattr(par.values, TdboutConstants.OPTION_STYLE, None): par.error('cannot specify -%s and -%s together' % (TdboutConstants.OPTION_LIST_SHORT, TdboutConstants.OPTION_STYLE_SHORT)) setattr(par.values, TdboutConstants.OPTION_STYLE, TdboutConstants.OPTION_STYLE_LIST) setattr(par....
def __synonym_list(opt, str, val, par): if getattr(par.values, TdboutConstants.OPTION_STYLE, None): par.error('cannot specify -%s and -%s together' % (TdboutConstants.OPTION_LIST_SHORT, TdboutConstants.OPTION_STYLE_SHORT)) setattr(par.values, TdboutConstants.OPTION_STYLE, TdboutConstants.OPTION_STYLE_LIST) setattr(par....
455,611
def db_len(uistr, maxlen): if uistr is None: return None if len(uistr) > maxlen: __log('Warning: String is over %d characters long: %s' % (maxlen, uistr), options) return uistr[0:maxlen]
def db_len(uistr, maxlen): if uistr is None: return None if len(uistr) > maxlen: __log('Warning: String is over %d characters long: %s' % (maxlen, uistr), options) return uistr[0:maxlen]
455,612
def _is_reported(auid): # If you change this list, be sure to change the equivalent list # in BurpReport.py. return ( ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("aappublications") != -1)) or ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("ama-assn") != -1)) or ((auid.find("ClockssHighWireP...
def _is_reported(auid): # If you change this list, be sure to change the equivalent list # in BurpReport.py. return ( ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("aappublications") != -1)) or ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("ama-assn") != -1)) or ((auid.find("ClockssHighWireP...
455,613
def _is_reported(auid): # If you change this list, be sure to change the equivalent list # in BurpReport.py. return ( ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("aappublications") != -1)) or ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("ama-assn") != -1)) or ((auid.find("ClockssHighWireP...
def _is_reported(auid): # If you change this list, be sure to change the equivalent list # in BurpReport.py. return ( ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("aappublications") != -1)) or ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("ama-assn") != -1)) or ((auid.find("ClockssHighWireP...
455,614
def _is_reported(auid): # If you change this list, be sure to change the equivalent list # in BurpReport.py. return ( ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("aappublications") != -1)) or ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("ama-assn") != -1)) or ((auid.find("ClockssHighWireP...
def _is_reported(auid): # If you change this list, be sure to change the equivalent list # in BurpReport.py. return ( ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("aappublications") != -1)) or ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("ama-assn") != -1)) or ((auid.find("ClockssHighWireP...
455,615
def _is_reported(auid): # If you change this list, be sure to change the equivalent list # in BurpReport.py. return ( ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("aappublications") != -1)) or ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("ama-assn") != -1)) or ((auid.find("ClockssHighWireP...
def _is_reported(auid): # If you change this list, be sure to change the equivalent list # in BurpReport.py. return ( ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("aappublications") != -1)) or ((auid.find("ClockssHighWirePlugin") != -1) and (auid.find("ama-assn") != -1)) or ((auid.find("ClockssHighWireP...
455,616
def tdbq_reprocess(tdb, options): '''Reprocesses a Tdb instance according to the query that may be included in the options. Returns the same Tdb instance if there is no query.''' if not (options.testingStatuses or options.productionStatuses or options.query): return tdb query = None if options.query: query = TdbqParse...
def tdbq_reprocess(tdb, options): '''Reprocesses a Tdb instance according to the query that may be included in the options. Returns the same Tdb instance if there is no query.''' if not (options.testingStatuses or options.productionStatuses or options.query): return tdb query = None if options.query: query = TdbqParse...
455,617
def tdbq_reprocess(tdb, options): '''Reprocesses a Tdb instance according to the query that may be included in the options. Returns the same Tdb instance if there is no query.''' if not (options.testingStatuses or options.productionStatuses or options.query): return tdb query = None if options.query: query = TdbqParse...
def tdbq_reprocess(tdb, options): '''Reprocesses a Tdb instance according to the query that may be included in the options. Returns the same Tdb instance if there is no query.''' if not (options.testingStatuses or options.productionStatuses or options.query): return tdb query = None if options.query: query = TdbqParse...
455,618
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize ...
455,619
def next(self): '''Consumes and returns one token from the input string. Returns a token of type TdbqToken.END_OF_STRING the first time the end of the query string is reached, and raises a runtime exception thereafter.''' # Already at end of string if self.__cur.type() == TdbqToken.END_OF_STRING: raise RuntimeError, '...
def next(self): '''Consumes and returns one token from the input string. Returns a token of type TdbqToken.END_OF_STRING the first time the end of the query string is reached, and raises a runtime exception thereafter.''' # Already at end of string if self.__cur.type() == TdbqToken.END_OF_STRING: raise RuntimeError, '...
455,620
def __expression(self): '''expression : TdbqToken.PAREN_OPEN or_expression TdbqToken.PAREN_CLOSE | TdbqToken.IDENTIFIER TdbqToken.IS TdbqToken.NOT? ( TdbqToken.SET | TdbqToken.STRING ) | TdbqToken.IDENTIFIER ( TdbqToken.EQUAL | TdbqToken.NOT_EQUAL | TdbqToken.MATCHES | TdbqToken.DOES_NOT_MATCH ) TdbqToken.STRING ;''' i...
def __expression(self): '''expression : TdbqToken.PAREN_OPEN or_expression TdbqToken.PAREN_CLOSE | TdbqToken.IDENTIFIER TdbqToken.IS TdbqToken.NOT? ( TdbqToken.SET | TdbqToken.STRING ) | TdbqToken.IDENTIFIER ( TdbqToken.EQUAL | TdbqToken.NOT_EQUAL | TdbqToken.MATCHES | TdbqToken.DOES_NOT_MATCH ) TdbqToken.STRING ;''' i...
455,621
def load_db(self): import urllib2 import time import md5 import xml.dom.minidom
def load_db(self): import urllib2 import time import md5 import xml.dom.minidom
455,622
def load_db(self): import urllib2 import time import md5 import xml.dom.minidom
defself.db.set(e, rhythmdb.PROP_GENRE, e_genre) load_db(self):self.db.set(e, rhythmdb.PROP_GENRE, e_genre) importself.db.set(e, rhythmdb.PROP_GENRE, e_genre) urllib2self.db.set(e, rhythmdb.PROP_GENRE, e_genre) importself.db.set(e, rhythmdb.PROP_GENRE, e_genre) timeself.db.set(e, rhythmdb.PROP_GENRE, e_genre) importself...
455,623
def register_all_content_for_intids(portal): """Registers all existing content with the intid utility. This will not be fast.""" cat = getToolByName(portal, 'portal_catalog', None) intids = getUtility(IIntIds) register = intids.register # Take advantage of paths stored in keyreferences in five.intid to optimize # regi...
def register_all_content_for_intids(portal): """Registers all existing content with the intid utility. This will not be fast.""" cat = getToolByName(portal, 'portal_catalog', None) intids = getUtility(IIntIds) register = intids.register # Take advantage of paths stored in keyreferences in five.intid to optimize # regi...
455,624
def _PopulateDuplicateDB(self, db): """Populate db with SHA1 -> URL mapping for packages.
def _PopulateDuplicateDB(self, db): """Populate db with SHA1 -> URL mapping for packages.
455,625
def SetUploadLocation(self, base_uri, path_prefix): """Set upload location to base_uri + path_prefix.
def SetUploadLocation(self, base_uri, path_prefix): """Set upload location to base_uri + path_prefix.
455,626
def GrabRemotePackageIndex(binhost_url): """Grab the latest binary package database from the specified URL. Args: binhost_url: Base URL of remote packages (PORTAGE_BINHOST). Returns: A PackageIndex object, if the Packages file can be retrieved. If the server returns status code 404, None is returned. """ url = urlpa...
def GrabRemotePackageIndex(binhost_url): """Grab the latest binary package database from the specified URL. Args: binhost_url: Base URL of remote packages (PORTAGE_BINHOST). Returns: A PackageIndex object, if the Packages file can be retrieved. If the server returns status code 404, None is returned. """ url = '%s/P...
455,627
def _PopulateDuplicateDB(self, db): """Populate db with SHA1 -> URL mapping for packages.
def _PopulateDuplicateDB(self, db): """Populate db with SHA1 -> URL mapping for packages.
455,628
def SetUploadLocation(self, base_uri, path_prefix): """Set upload location to base_uri + path_prefix.
def SetUploadLocation(self, base_uri, path_prefix): """Set upload location to base_uri + path_prefix.
455,629
def _PopulateDuplicateDB(self, db): """Populate db with SHA1 -> URL mapping for packages.
def _PopulateDuplicateDB(self, db): """Populate db with SHA1 -> URL mapping for packages.
455,630
def ResolveDuplicateUploads(self, pkgindexes): """Point packages at files that have already been uploaded.
def ResolveDuplicateUploads(self, pkgindexes): """Point packages at files that have already been uploaded.
455,631
def ResolveDuplicateUploads(self, pkgindexes): """Point packages at files that have already been uploaded.
def ResolveDuplicateUploads(self, pkgindexes): """Point packages at files that have already been uploaded.
455,632
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False, shell=False): """Runs a command. Args: cmd: cmd to run. Should be input to subprocess.Popen. print_cmd: prints the command before running it....
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False, shell=False): """Runs a command. Args: cmd: cmd to run. Should be input to subprocess.Popen. print_cmd: prints the command before running it....
455,633
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False, shell=False): """Runs a command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an arra...
455,634
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.Popen. print_cmd -- prints the command before ru...
455,635
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
455,636
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
455,637
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
455,638
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False): """Runs a shell command. Keyword arguments: cmd - cmd to run. Should be input to subprocess.POpen. If a string, converted to an array using...
455,639
def _cleanup_node_project(): LOG.info("Cleaning up node project: %s" % ENV['NODE_PROJECT']) LOG.info("\tCalculating size...") # pick a folder you have ... folder_size = 0 for (path, dirs, files) in os.walk(ENV['NODE_PROJECT']): for file in files: filename = os.path.join(path, file) folder_size += os.path.getsize(filena...
def _cleanup_node_project(): LOG.info("Cleaning up node project: %s" % ENV['NODE_PROJECT']) LOG.info("\tCalculating size...") # pick a folder you have ...LOG.info("\tThis could take a while...") size = sum([os.path.getsize(os.path.join(root,f)) for root,dirs,files in os.walk(ENV['NODE_PROJECT']) for f in files]) LOG.in...
455,640
def get_log(name=__name__, stream=False): log = logging.getLogger(name) log.setLevel(__LOG_LEVEL__) if stream: handler = logging.StreamHandler() formatter = logging.Formatter("%(name)s %(levelname)s: %(message)s") handler.setFormatter(formatter) log.addHandler(handler) return log
def get_log(name=__name__, stream=False): log = logging.getLogger(name) log.setLevel(__LOG_LEVEL__) if stream: handler = logging.StreamHandler() formatter = logging.Formatter("%(name)s %(levelname)s: %(message)s") handler.setFormatter(formatter) log.addHandler(handler) return log
455,641
def test_invalid_path(self): self.assertRaises(InvalidPathError, ProjectPath, r"D:\my\path") self.assertRaises(InvalidPathError, ProjectPath, "D:/my/path") self.assertRaises(InvalidPathError, ProjectPath, r"Z:\my\path") self.assertRaises(InvalidPathError, ProjectPath, "Z:/my/path")
def test_invalid_path(self): self.assertRaises(InvalidPathError, ProjectPath, r"D:\my\path") self.assertRaises(InvalidPathError, ProjectPath, "D:/my/path")
455,642
def test_nt_letter_unc_substitution(self): tail = "maya\\foo\\scenes\\bar.mb" self.assertEquals(ProjectPath(SPOOL_LETTER, tail).path, ProjectPath(SPOOL_UNC, tail).path) self.assertEquals(ProjectPath(SPOOL_LETTER, tail).unc, ProjectPath(SPOOL_UNC, tail).unc) self.assertEquals(ProjectPath(SPOOL_LETTER, tail).ppath, Proje...
def test_nt_letter_unc_substitution(self): tail = "\\maya\\foo\\scenes\\bar.mb" self.assertEquals(ProjectPath(SPOOL_LETTER, tail).path, ProjectPath(SPOOL_UNC, tail).path) self.assertEquals(ProjectPath(SPOOL_LETTER, tail).unc, ProjectPath(SPOOL_UNC, tail).unc) self.assertEquals(ProjectPath(SPOOL_LETTER, tail).ppath, Pro...
455,643
def job_data(self): job_uuid = JobSpec.new_uuid() start_frame = min((int(self.start_field.value()), int(self.end_field.value()))) end_frame = max((int(self.start_field.value()), int(self.end_field.value()))) image_filename = str(self.output_base_field.text()) + str(self.output_ext_field.currentText()) return { 'rendere...
def job_data(self): job_uuid = JobSpec.new_uuid() start_frame = min((int(self.start_field.value()), int(self.end_field.value()))) end_frame = max((int(self.start_field.value()), int(self.end_field.value()))) image_filename = str(self.output_base_field.text()) + str(self.output_ext_field.currentText()) return { 'rendere...
455,644
def __init__(self, title, project, scene, start, end, step=1, **kwargs): data = dict(title=title, project=project, scene=scene, start=start, end=end, step=step) data.update(kwargs) self._set_data(data) print self.data
def __init__(self, title, project, scene, start, end, step=1, **kwargs): data = dict(title=title, project=project, scene=scene, start=start, end=end, step=step) data.update(kwargs) self._set_data(data)
455,645
def submit_job(self): try: spec = JobSpec(**self.job_data) # TODO: find a better place to do this. if not str(self.output_base_field.text()): raise RuntimeError("Output cannot be blank.") # Key env vars that influence submission os.environ['HEAD_NODE'] = str(self.head_node_field.currentText()) spec.submit_job(pause=Tr...
def submit_job(self): try: spec = JobSpec(**self.job_data) # TODO: find a better place to do this. if not str(self.output_base_field.text()): raise RuntimeError("Output cannot be blank.") # Key env vars that influence submission os.environ['HEAD_NODE'] = str(self.head_node_field.currentText()) spec.submit_job(pause=Tr...
455,646
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error("Unable to reach cluster head node: %s" % self.HeadNode) LOG.error(e) LOG.info("Exiting...") sys.exit(2)
def DoIt(self): scheduler = Scheduler() # make a connection to the clustertry: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error("Unable to reach cluster head node: %s" % self.HeadNode) LOG.error(e) LOG.info("Exiting...") sys.exit(2)
455,647
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error("Unable to reach cluster head node: %s" % self.HeadNode) LOG.error(e) LOG.info("Exiting...") sys.exit(2)
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error("Unable to reach cluster head node: %s" % self.HeadNode)...
455,648
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error("Unable to reach cluster head node: %s" % self.HeadNode) LOG.error(e) LOG.info("Exiting...") sys.exit(2)
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error(e) LOG.info("Exiting...") sys.exit(2)
455,649
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error("Unable to reach cluster head node: %s" % self.HeadNode) LOG.error(e) LOG.info("Exiting...") sys.exit(2)
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error("Unable to reach cluster head node: %s" % self.HeadNode) LOG.error(e) LOG.info("Exiting...") sys.exit(2)
455,650
def main(): conf_path = None try: conf_path = os.path.abspath(sys.argv[1]) except IndexError: LOG.error("Must specify an ini file.") LOG.info("Exiting...") sys.exit(3) LOG.info("Spooling job from %s" % conf_path) try: spool = Spooler(conf_path) spool.DoIt() except Exception, e: LOG.error(e) sys.exit(-1)
def main(): conf_path = None try: conf_path = os.path.abspath(sys.argv[1]) except IndexError: LOG.error("Must specify an ini file.") LOG.info("Exiting...") sys.exit(3) LOG.info("Spooling job from %s" % conf_path) try: spool = Spooler(conf_path) spool.DoIt() except Exception, e: LOG.error(e) sys.exit(-1)
455,651
def HeadNode(self): host = os.getenv("HEAD_NODE", None) if None == host: print >> sys.stderr, "\nError!" print >> sys.stderr, "HEAD_NODE is null - please set HEAD_NODE." print >> sys.stderr, "Exiting..." sys.exit(1) return host.strip()
def HeadNode(self): host = os.getenv("HEAD_NODE", None) if None == host: LOG.error("HEAD_NODE is null - please set HEAD_NODE.") LOG.info("Exiting...") sys.exit(1) return host.strip()
455,652
def SetJobEnv(self,task): task.SetEnvironmentVariable("MAYA_APP_DIR", self._conf["user_dir"]) task.SetEnvironmentVariable("TEMP", self._conf["user_dir"]) task.SetEnvironmentVariable("TMP", self._conf["user_dir"]) task.SetEnvironmentVariable("OWNER", getpass.getuser()) task.SetEnvironmentVariable("USER_DIR", self._conf[...
def SetJobEnv(self,task): task.SetEnvironmentVariable("MAYA_APP_DIR", self._conf["user_dir"]) task.SetEnvironmentVariable("TEMP", self._conf["node_project"]) task.SetEnvironmentVariable("TMP", self._conf["node_project"]) task.SetEnvironmentVariable("OWNER", getpass.getuser()) task.SetEnvironmentVariable("USER_DIR", sel...
455,653
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster print "Connecting to cluster at: %s" % self.HeadNode try: scheduler.Connect(self.HeadNode) except: print >> sys.stderr, "\nError!" print >> sys.stderr, "Unable to reach cluster head node: %s" % self.HeadNode print >> sys.stderr, "Exiting..." sys...
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: scheduler.Connect(self.HeadNode) except: print >> sys.stderr, "\nError!" print >> sys.stderr, "Unable to reach cluster head node: %s" % self.HeadNode print >> sys.stderr, "Exiting..."...
455,654
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster print "Connecting to cluster at: %s" % self.HeadNode try: scheduler.Connect(self.HeadNode) except: print >> sys.stderr, "\nError!" print >> sys.stderr, "Unable to reach cluster head node: %s" % self.HeadNode print >> sys.stderr, "Exiting..." sys...
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster print "Connecting to cluster at: %s" % self.HeadNode try: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error("Unable to reach cluster head node: %s" % self.HeadNode) LOG.error(e) LOG.info("Exiting...") sys.exit(2)
455,655
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster print "Connecting to cluster at: %s" % self.HeadNode try: scheduler.Connect(self.HeadNode) except: print >> sys.stderr, "\nError!" print >> sys.stderr, "Unable to reach cluster head node: %s" % self.HeadNode print >> sys.stderr, "Exiting..." sys...
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster print "Connecting to cluster at: %s" % self.HeadNode try: scheduler.Connect(self.HeadNode) except: print >> sys.stderr, "\nError!" print >> sys.stderr, "Unable to reach cluster head node: %s" % self.HeadNode print >> sys.stderr, "Exiting..." sys...
455,656
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster print "Connecting to cluster at: %s" % self.HeadNode try: scheduler.Connect(self.HeadNode) except: print >> sys.stderr, "\nError!" print >> sys.stderr, "Unable to reach cluster head node: %s" % self.HeadNode print >> sys.stderr, "Exiting..." sys...
defDoIt(self):scheduler=Scheduler()#makeaconnectiontotheclusterprint"Connectingtoclusterat:%s"%self.HeadNodetry:scheduler.Connect(self.HeadNode)except:print>>sys.stderr,"\nError!"print>>sys.stderr,"Unabletoreachclusterheadnode:%s"%self.HeadNodeprint>>sys.stderr,"Exiting..."sys.exit(2)
455,657
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster print "Connecting to cluster at: %s" % self.HeadNode try: scheduler.Connect(self.HeadNode) except: print >> sys.stderr, "\nError!" print >> sys.stderr, "Unable to reach cluster head node: %s" % self.HeadNode print >> sys.stderr, "Exiting..." sys...
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster print "Connecting to cluster at: %s" % self.HeadNode try: scheduler.Connect(self.HeadNode) except: print >> sys.stderr, "\nError!" print >> sys.stderr, "Unable to reach cluster head node: %s" % self.HeadNode print >> sys.stderr, "Exiting..." sys...
455,658
def main(): conf_path = None try: conf_path = os.path.abspath(sys.argv[1]) except IndexError: print >> sys.stderr, "\nError!" print >> sys.stderr, "Must specify an ini file." print >> sys.stderr, "Exiting..." sys.exit(3) print "Spooling job from %s" % conf_path try: spool = Spooler(conf_path) spool.DoIt() except Except...
def main(): conf_path = None try: conf_path = os.path.abspath(sys.argv[1]) except IndexError: LOG.error("Must specify an ini file.") LOG.info("Exiting...") sys.exit(3) print "Spooling job from %s" % conf_path try: spool = Spooler(conf_path) spool.DoIt() except Exception, e: print >> sys.stderr, e sys.exit(-1)
455,659
def main(): conf_path = None try: conf_path = os.path.abspath(sys.argv[1]) except IndexError: print >> sys.stderr, "\nError!" print >> sys.stderr, "Must specify an ini file." print >> sys.stderr, "Exiting..." sys.exit(3) print "Spooling job from %s" % conf_path try: spool = Spooler(conf_path) spool.DoIt() except Except...
def main(): conf_path = None try: conf_path = os.path.abspath(sys.argv[1]) except IndexError: print >> sys.stderr, "\nError!" print >> sys.stderr, "Must specify an ini file." print >> sys.stderr, "Exiting..." sys.exit(3) LOG.info("Spooling job from %s" % conf_path) try: spool = Spooler(conf_path) spool.DoIt() except Ex...
455,660
def main(): conf_path = None try: conf_path = os.path.abspath(sys.argv[1]) except IndexError: print >> sys.stderr, "\nError!" print >> sys.stderr, "Must specify an ini file." print >> sys.stderr, "Exiting..." sys.exit(3) print "Spooling job from %s" % conf_path try: spool = Spooler(conf_path) spool.DoIt() except Except...
def main(): conf_path = None try: conf_path = os.path.abspath(sys.argv[1]) except IndexError: print >> sys.stderr, "\nError!" print >> sys.stderr, "Must specify an ini file." print >> sys.stderr, "Exiting..." sys.exit(3) print "Spooling job from %s" % conf_path try: spool = Spooler(conf_path) spool.DoIt() except Except...
455,661
def determine_infostring(self): self.size = 0 if self.is_device: self.infostring = 'dev' elif self.is_fifo: self.infostring = 'fifo' elif self.is_socket: self.infostring = 'sock' elif self.is_directory: try: self.size = len(os.listdir(self.path)) self.infostring = " %d" % self.size self.accessible = True self.runnable ...
def determine_infostring(self): self.size = 0 if self.is_device: self.infostring = 'dev' elif self.is_fifo: self.infostring = 'fifo' elif self.is_socket: self.infostring = 'sock' elif self.is_directory: try: self.size = len(os.listdir(self.path)) self.infostring = " %d" % self.size self.accessible = True self.runnable ...
455,662
def determine_infostring(self): self.size = 0 if self.is_device: self.infostring = 'dev' elif self.is_fifo: self.infostring = 'fifo' elif self.is_socket: self.infostring = 'sock' elif self.is_directory: try: self.size = len(os.listdir(self.path)) self.infostring = " %d" % self.size self.accessible = True self.runnable ...
def determine_infostring(self): self.size = 0 if self.is_device: self.infostring = 'dev' elif self.is_fifo: self.infostring = 'fifo' elif self.is_socket: self.infostring = 'sock' elif self.is_directory: try: self.size = len(os.listdir(self.path)) self.infostring = " %d" % self.size self.accessible = True self.runnable ...
455,663
def determine_infostring(self): self.size = 0 if self.is_device: self.infostring = 'dev' elif self.is_fifo: self.infostring = 'fifo' elif self.is_socket: self.infostring = 'sock' elif self.is_directory: try: self.size = len(os.listdir(self.path)) self.infostring = " %d" % self.size self.accessible = True self.runnable ...
def determine_infostring(self): self.size = 0 if self.is_device: self.infostring = 'dev' elif self.is_fifo: self.infostring = 'fifo' elif self.is_socket: self.infostring = 'sock' elif self.is_directory: try: self.size = len(os.listdir(self.path)) self.infostring = " %d" % self.size self.accessible = True self.runnable ...
455,664
def _get_left_part(self, bar): left = bar.left
def _get_left_part(self, bar): left = bar.left
455,665
def _get_right_part(self, bar): right = bar.right if self.column is None: return
def _get_right_part(self, bar): right = bar.right if self.column is None: return
455,666
def handle_input(self): key = self.win.getch() if key is 27 or key >= 128 and key < 256: # Handle special keys like ALT+X or unicode here: keys = [key] previous_load_mode = self.load_mode self.set_load_mode(True) for n in range(4): getkey = self.win.getch() if getkey is not -1: keys.append(getkey) if len(keys) == 1: ke...
def handle_input(self): key = self.win.getch() if key is 27 or key >= 128 and key < 256: # Handle special keys like ALT+X or unicode here: keys = [key] previous_load_mode = self.load_mode self.set_load_mode(True) for n in range(4): getkey = self.win.getch() if getkey is not -1: keys.append(getkey) if len(keys) == 1: ke...
455,667
def insert_before_filename(arg): append_to_filename(arg) arg.fm.ui.console.move(right=len('rename '), absolute=True)
def insert_before_filename(arg): append_to_filename(arg) arg.fm.ui.console.move(right=len('rename '), absolute=True)
455,668
def signal_emit(self, signal_name, **kw): assert isinstance(signal_name, str) try: handlers = self._signals[signal_name] except: return if not handlers: return
def signal_emit(self, signal_name, **kw): assert isinstance(signal_name, str) if signal_name not in self._signals: return True handlers = self._signals[signal_name] if not handlers: return
455,669
def signal_emit(self, signal_name, **kw): assert isinstance(signal_name, str) try: handlers = self._signals[signal_name] except: return if not handlers: return
def signal_emit(self, signal_name, **kw): assert isinstance(signal_name, str) try: handlers = self._signals[signal_name] except: return True if not handlers: return
455,670
def signal_emit(self, signal_name, **kw): assert isinstance(signal_name, str) try: handlers = self._signals[signal_name] except: return if not handlers: return
def signal_emit(self, signal_name, **kw): assert isinstance(signal_name, str) try: handlers = self._signals[signal_name] except: return False if not handlers: return
455,671
def _substitute_metachars(self, command): macros = {}
def _substitute_metachars(self, command): macros = {}
455,672
def _substitute_metachars(self, command): macros = {}
def _substitute_metachars(self, command): macros = {}
455,673
def __init__(self, ui=None, bookmarks=None, tags=None): """Initialize FM.""" Actions.__init__(self) SignalDispatcher.__init__(self) self.ui = ui self.log = deque(maxlen=20) self.bookmarks = bookmarks self.tags = tags self.tabs = {} self.current_tab = 1 self.loader = Loader() self._executables = None self.apps = self.se...
def __init__(self, ui=None, bookmarks=None, tags=None): """Initialize FM.""" Actions.__init__(self) SignalDispatcher.__init__(self) self.ui = ui self.log = deque(maxlen=20) self.bookmarks = bookmarks self.tags = tags self.tabs = {} self.current_tab = 1 self.loader = Loader() self._executables = None self.apps = self.se...
455,674
def press(self, key): from curses.ascii import ctrl, ESC
def press(self, key): from curses.ascii import ctrl, ESC
455,675
def delete(self): self.notify("Deleting!", duration=1) selected = self.env.get_selection() self.env.copy -= selected if selected: for f in selected: if os.path.isdir(f.path) and not os.path.islink(f.path): try: shutil.rmtree(f.path) except OSError as err: self.notify(str(err), bad=True) else: try: os.remove(f.path) exc...
def delete(self): self.notify("Deleting!", duration=1) selected = self.env.get_selection() self.env.copy -= set(selected) if selected: for f in selected: if os.path.isdir(f.path) and not os.path.islink(f.path): try: shutil.rmtree(f.path) except OSError as err: self.notify(str(err), bad=True) else: try: os.remove(f.path...
455,676
def print_function(string): print(string)
def print_function(string): print(string)
455,677
def print_function(string): print(string)
def print_function(string): print(string)
455,678
def print_function(string): print(string)
defprint_function(string):print(string)
455,679
def print_function(string): print(string)
def print_function(string): print(string)
455,680
def refresh(_): cwd = self.env.get_directory(original_path) cwd.load_content()
def refresh(_): cwd = self.env.get_directory(original_path) cwd.load_content()
455,681
def _tab_only_directories(self): from os.path import dirname, basename, expanduser, join, isdir
def _tab_only_directories(self): from os.path import dirname, basename, expanduser, join, isdir
455,682
def _tab_only_directories(self): from os.path import dirname, basename, expanduser, join, isdir
def _tab_only_directories(self): from os.path import dirname, basename, expanduser, join, isdir
455,683
def _tab_directory_content(self): from os.path import dirname, basename, expanduser, join, isdir
def _tab_directory_content(self): from os.path import dirname, basename, expanduser, join, isdir
455,684
def _tab_directory_content(self): from os.path import dirname, basename, expanduser, join, isdir
def _tab_directory_content(self): from os.path import dirname, basename, expanduser, join, isdir
455,685
def draw(self): """Call either _draw_file() or _draw_directory()""" from ranger import log
def draw(self): """Call either _draw_file() or _draw_directory()""" from ranger import log
455,686
def draw(self): """Call either _draw_file() or _draw_directory()""" from ranger import log
def draw(self): """Call either _draw_file() or _draw_directory()""" from ranger import log
455,687
def _draw_directory(self): """Draw the contents of a directory"""
def _draw_directory(self): """Draw the contents of a directory"""
455,688
def load_settings(fm, clean): import ranger import ranger.api.commands if not clean: allow_access_to_confdir(ranger.arg.confdir, True) # Load commands comcont = ranger.api.commands.CommandContainer() ranger.api.commands.alias = comcont.alias try: import commands comcont.load_commands_from_module(commands) except Impor...
def load_settings(fm, clean): import ranger.shared import ranger.api.commands if not clean: allow_access_to_confdir(ranger.arg.confdir, True) # Load commands comcont = ranger.api.commands.CommandContainer() ranger.api.commands.alias = comcont.alias try: import commands comcont.load_commands_from_module(commands) excep...
455,689
def load_settings(fm, clean): import ranger import ranger.api.commands if not clean: allow_access_to_confdir(ranger.arg.confdir, True) # Load commands comcont = ranger.api.commands.CommandContainer() ranger.api.commands.alias = comcont.alias try: import commands comcont.load_commands_from_module(commands) except Impor...
def load_settings(fm, clean): import ranger import ranger.api.commands if not clean: allow_access_to_confdir(ranger.arg.confdir, True) # Load commands comcont = ranger.api.commands.CommandContainer() ranger.api.commands.alias = comcont.alias try: import commands comcont.load_commands_from_module(commands) except Impor...
455,690
def append_to_filename(arg): command = 'rename ' + arg.fm.env.cf.basename arg.fm.open_console(cmode.COMMAND, command)
def append_to_filename(arg): command = 'rename ' + arg.fm.env.cf.basename arg.fm.open_console(cmode.COMMAND, command)
455,691
def print_function(string): print(string)
def print_function(string): print(string)
455,692
def postprocess_paths(signal): import os signal.value = os.path.expanduser(signal.value)
def postprocess_paths(signal): import os signal.value = os.path.expanduser(signal.value)
455,693
def execute(self): line = parse(self.line) try: destination = line.rest(1) except IndexError: destination = '~'
def execute(self): line = parse(self.line) destination = line.rest(1) if not destination: destination = '~'
455,694
def open(self, mode, string='', prompt=None): if not is_valid_mode(mode): return False if prompt is not None: assert isinstance(prompt, str) self.prompt = prompt elif hasattr(self, 'prompt'): del self.prompt
def open(self, mode, string='', prompt=None): if not is_valid_mode(mode): return False if prompt is not None: assert isinstance(prompt, str) self.prompt = prompt elif 'prompt' in self.__dict__: del self.prompt
455,695
def print_function(string): print(string)
def print_function(string): print(string)
455,696
def append_to_filename(arg): command = 'rename ' + arg.fm.env.cf.basename arg.fm.open_console(cmode.COMMAND, command)
def append_to_filename(arg): command = 'rename ' + arg.fm.env.cf.basename arg.fm.open_console(cmode.COMMAND, command)
455,697
def draw(self): if self.mode is None: return
def draw(self): if self.mode is None: return
455,698
def finalize(self): try: self.fm.ui.win.move(self.y, self.x + self.pos + len(self.prompt)) except: pass
def finalize(self): try: self.fm.ui.win.move(self.y, self.x + min(self.wid-1, self.pos + len(self.prompt))) except: pass
455,699