bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | 455,400 |
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | 455,401 |
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | 455,402 |
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | 455,403 |
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | 455,404 |
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,405 |
def __init__(self, function, timeout=MAX_TIMEOUT): | def __init__(self, function, timeout=MAX_TIMEOUT): | 455,406 |
def _connect(self, server, proxy): try: if proxy: self.log.debug("Trying proxied connection... (%r)"% proxy) self.proxied_transport = ProxiedTransport() self.proxied_transport.set_proxy(proxy) self.xmlrpc_server = ServerProxy(server, transport=self.proxied_transport, allow_none=True) #self.ServerInfo() self.log.debug("... | def _connect(self, server, proxy): try: if proxy: self.log.debug("Trying proxied connection... (%r)"% proxy) self.proxied_transport = ProxiedTransport() self.proxied_transport.set_proxy(proxy) self.xmlrpc_server = ServerProxy(server, transport=self.proxied_transport, allow_none=True) #self.ServerInfo() self.log.debug("... | 455,407 |
def login(self, username="", password=""): login = TimeoutFunction(self._login) try: return login(username, password) except TimeoutFunctionException: self.log.error("login timed out") | def login(self, username="", password=""): try: login = TimeoutFunction(self._login) return login(username, password) except TimeoutFunctionException: self.log.error("login timed out") | 455,408 |
def _login(self, username="", password=""): """Login to the Server using username/password, empty parameters means an anonymously login Returns True if login sucessful, and False if not. """ self.log.debug("----------------") self.log.debug("Logging in (username: %s)..."% username) | def _login(self, username="", password=""): """Login to the Server using username/password, empty parameters means an anonymously login Returns True if login sucessful, and False if not. """ self.log.debug("----------------") self.log.debug("Logging in (username: %s)..."% username) | 455,409 |
def logout(self): logout = TimeoutFunction(self._logout) try: return logout() except TimeoutFunctionException: self.log.error("logout timed out") | def logout(self): try: logout = TimeoutFunction(self._logout) return logout() except TimeoutFunctionException: self.log.error("logout timed out") | 455,410 |
def _logout(self): """Logout from current session(token) This functions doesn't return any boolean value, since it can 'fail' for anonymous logins """ self.log.debug("Logging out from session ID: %s"% self._token) info = self.xmlrpc_server.LogOut(self._token) self.log.debug("Logout ended in %s with status: %s"% (info['... | def _logout(self): """Logout from current session(token) This functions doesn't return any boolean value, since it can 'fail' for anonymous logins """ self.log.debug("Logging out from session ID: %s"% self._token) info = self.xmlrpc_server.LogOut(self._token) self.log.debug("Logout ended in %s with status: %s"% (info['... | 455,411 |
def _GetSubLanguages(self, language): """Return all suported subtitles languages in a dictionary If language var is set, returns SubLanguageID for it """ self.log.debug("----------------") self.log.debug("GetSubLanguages RPC method starting...") if language == "all": # return result right away if no 'translation' neede... | def _GetSubLanguages(self, language): """Return all suported subtitles languages in a dictionary If language var is set, returns SubLanguageID for it """ self.log.debug("----------------") self.log.debug("GetSubLanguages RPC method starting...") if language == "all": # return result right away if no 'translation' neede... | 455,412 |
def _CheckSubHash(self, hashes): """ @hashes = list of subtitle hashes or video object returns: dictionary like { hash: subID } This method returns !IDSubtitleFile, if Subtitle Hash exists. If not exists, it returns '0'. """ self.log.debug("----------------") self.log.debug("CheckSubHash RPC method starting...") if isi... | def _CheckSubHash(self, hashes): """ @hashes = list of subtitle hashes or video object returns: dictionary like { hash: subID } This method returns !IDSubtitleFile, if Subtitle Hash exists. If not exists, it returns '0'. """ self.log.debug("----------------") self.log.debug("CheckSubHash RPC method starting...") if isi... | 455,413 |
def _DownloadSubtitles(self, subtitles): #TODO: decide wheter this should save the subtitle (as it does atm) or just return the encoded data #Note ivan: in my GUI before I replace the file I'll show a confirmation code """ Download subtitles by there id's @subtitles: dictionary with subtitle id's and their path - { id... | def _DownloadSubtitles(self, subtitles): #TODO: decide wheter this should save the subtitle (as it does atm) or just return the encoded data #Note ivan: in my GUI before I replace the file I'll show a confirmation code """ Download subtitles by there id's @subtitles: dictionary with subtitle id's and their path - { id... | 455,414 |
def _DownloadSubtitles(self, subtitles): #TODO: decide wheter this should save the subtitle (as it does atm) or just return the encoded data #Note ivan: in my GUI before I replace the file I'll show a confirmation code """ Download subtitles by there id's @subtitles: dictionary with subtitle id's and their path - { id... | def _DownloadSubtitles(self, subtitles): #TODO: decide wheter this should save the subtitle (as it does atm) or just return the encoded data #Note ivan: in my GUI before I replace the file I'll show a confirmation code """ Download subtitles by there id's @subtitles: dictionary with subtitle id's and their path - { id... | 455,415 |
def _CheckSoftwareUpdates(self, app=None): """Returns latest info on the given application if available """ self.log.debug("----------------") self.log.debug("CheckSoftwareUpdates RPC method starting...") if not app: app = APP_TITLE.lower() info = self.xmlrpc_server.CheckSoftwareUpdates(app) | def _CheckSoftwareUpdates(self, app=None): """Returns latest info on the given application if available """ self.log.debug("----------------") self.log.debug("CheckSoftwareUpdates RPC method starting...") if not app: app = APP_TITLE.lower() info = self.xmlrpc_server.CheckSoftwareUpdates(app) | 455,416 |
def NoOperation(self, token=None): NoOperation = TimeoutFunction(self._NoOperation) try: return NoOperation() except TimeoutFunctionException: self.log.error("NoOperation timed out") | def NoOperation(self, token=None): try: NoOperation = TimeoutFunction(self._NoOperation) return NoOperation() except TimeoutFunctionException: self.log.error("NoOperation timed out") | 455,417 |
def _NoOperation(self): """This method should be called every 15 minutes after last request to xmlrpc. It's used to keep current session alive. Returns True if current session token is valid and False if not. """ self.log.debug("----------------") self.log.debug("NoOperation RPC method starting...") info = self.xmlrpc_... | def _NoOperation(self): """This method should be called every 15 minutes after last request to xmlrpc. It's used to keep current session alive. Returns True if current session token is valid and False if not. """ self.log.debug("----------------") self.log.debug("NoOperation RPC method starting...") noop=False try: inf... | 455,418 |
def _SearchToMail(self, videos, languages): """Register user email to be noticed when given video subtitles are available to download @videos: video objects - list @languages: language id codes - list """ self.log.debug("----------------") self.log.debug("SearchToMail RPC method starting...") video_array = [] for video... | def _SearchToMail(self, videos, languages): """Register user email to be noticed when given video subtitles are available to download @videos: video objects - list @languages: language id codes - list """ self.log.debug("----------------") self.log.debug("SearchToMail RPC method starting...") video_array = [] for video... | 455,419 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,420 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,421 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,422 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,423 |
def translate_module_addresses(module, debugfile, addresses): '''\ Translate addresses in a module to (module, address, filename, lineno) tuples by invoking addr2line exactly once on the debugging symbols for that module. ''' with NamedTemporaryFile() as tempfile: log.info('\tExtracting debug symbols for module %s from... | def translate_module_addresses(module, debugfile, addresses): '''\ Translate addresses in a module to (module, address, filename, lineno) tuples by invoking addr2line exactly once on the debugging symbols for that module. ''' with NamedTemporaryFile() as tempfile: log.info('\tExtracting debug symbols for module %s from... | 455,424 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,425 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,426 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,427 |
# !ifdef INSTALL | #!ifdefINSTALL | 455,428 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,429 |
def GetDirs(path, dirs): dirs[path] = [] filelist = os.listdir(path) for f in filelist: fullname = path + f if os.path.isdir(fullname): if (f != 'Config') and (f != '.git'): fullname = fullname + '/' GetDirs(fullname, dirs) else: dirs[path].append(f) | def GetDirs(path, dirs): dirs[path] = [] filelist = os.listdir(path) for f in filelist: fullname = os.path.join(path, f) if os.path.isdir(fullname): if (f != 'Config') and (f != '.git'): GetDirs(fullname, dirs) else: dirs[path].append(f) | 455,430 |
def osName(path): return path.replace('/', '\\') | def toWinPath(path): return path.replace('/', '\\') | 455,431 |
def osName(path): return path.replace('/', '\\') | def osName(path): return path.replace('/', '\\') | 455,432 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,433 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,434 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,435 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,436 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,437 |
def translate_module_addresses(module, debugfile, addresses): '''\ Translate addresses in a module to (module, address, filename, lineno) tuples by invoking addr2line exactly once on the debugging symbols for that module. ''' with NamedTemporaryFile() as tempfile: log.info('\tExtracting debug symbols for module %s from... | def translate_module_addresses(module, debugfile, addresses): '''\ Translate addresses in a module to (module, address, filename, lineno) tuples by invoking addr2line exactly once on the debugging symbols for that module. ''' with NamedTemporaryFile() as tempfile: log.info('\tExtracting debug symbols for module %s from... | 455,438 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,439 |
def common_suffix_length(a, b): '''\ Compute the length of the common suffix of a and b, considering / and \ equal. >>> common_suffix_length('/foo/bar/baz', '\\\\other\\\\bar\\\\baz') 8 >>> common_suffix_length('bar', 'foo/bar') 3 >>> common_suffix_length('bar', 'bar') 3 ''' a = a.replace('\\', '/') b = b.replace('\\'... | def common_suffix_length(a, b): '''\ Compute the length of the common suffix of a and b, considering / and \ equal. >>> common_suffix_length('/foo/bar/baz', '\\\\other\\\\bar\\\\baz') 8 >>> common_suffix_length('bar', 'foo/bar') 3 >>> common_suffix_length('bar', 'bar') 3 ''' a = a.replace('\\', '/') b = b.replace('\\'... | 455,440 |
def best_matching_module(needle, haystack): '''\ Choose the best matching module, based on longest common suffix. This way it ignores the install location of Spring: >>> modules = ['spring.exe', 'AI/Skirmish/NullAI/SkirmishAI.dll'] >>> best_matching_module('c:/Program Files/Spring/spring.exe', modules) 'spring.exe' ... | def best_matching_module(needle, haystack): '''\ Choose the best matching module, based on longest common suffix. This way it ignores the install location of Spring: >>> modules = ['spring.exe', 'AI/Skirmish/NullAI/SkirmishAI.dll'] >>> best_matching_module('c:/Program Files/Spring/spring.exe', modules) 'spring.exe' >... | 455,441 |
def best_matching_module(needle, haystack): '''\ Choose the best matching module, based on longest common suffix. This way it ignores the install location of Spring: >>> modules = ['spring.exe', 'AI/Skirmish/NullAI/SkirmishAI.dll'] >>> best_matching_module('c:/Program Files/Spring/spring.exe', modules) 'spring.exe' ... | def best_matching_module(needle, haystack): '''\ Choose the best matching module, based on longest common suffix. This way it ignores the install location of Spring: >>> modules = ['spring.exe', 'AI/Skirmish/NullAI/SkirmishAI.dll'] >>> best_matching_module('c:/Program Files/Spring/spring.exe', modules) 'spring.exe' ... | 455,442 |
def best_matching_module(needle, haystack): '''\ Choose the best matching module, based on longest common suffix. This way it ignores the install location of Spring: >>> modules = ['spring.exe', 'AI/Skirmish/NullAI/SkirmishAI.dll'] >>> best_matching_module('c:/Program Files/Spring/spring.exe', modules) 'spring.exe' ... | def best_matching_module(needle, haystack): '''\ Choose the best matching module, based on longest common suffix. This way it ignores the install location of Spring: >>> modules = ['spring.exe', 'AI/Skirmish/NullAI/SkirmishAI.dll'] >>> best_matching_module('c:/Program Files/Spring/spring.exe', modules) 'spring.exe' ... | 455,443 |
def translate_module_addresses(module, debugfile, addresses): '''\ Translate addresses in a module to (module, address, filename, lineno) tuples by invoking addr2line exactly once on the debugging symbols for that module. ''' with NamedTemporaryFile() as tempfile: log.info('\tExtracting debug symbols for module %s from... | def translate_module_addresses(module, debugfile, addresses): '''\ Translate addresses in a module to (module, address, filename, lineno) tuples by invoking addr2line exactly once on the debugging symbols for that module. ''' with NamedTemporaryFile() as tempfile: log.info('\tExtracting debug symbols for module %s from... | 455,444 |
def translate_stacktrace(infolog): r'''\ Translate a complete stacktrace to (module, address, filename, lineno) tuples. The input string may be a complete infolog (i.e. infolog.txt). At the very least it must contain the 'Spring XXX has crashed.' or 'Hang detection triggered for Spring XXX.' line and at least one stac... | def translate_stacktrace(infolog): r'''\ Translate a complete stacktrace to (module, address, filename, lineno) tuples. The input string may be a complete infolog (i.e. infolog.txt). At the very least it must contain the 'Spring XXX has crashed.' or 'Hang detection triggered for Spring XXX.' line and at least one stac... | 455,445 |
def run_xmlrpc_server(): '''Run an XMLRPC server that publishes the translate_stacktrace function.''' from DocXMLRPCServer import DocXMLRPCServer as XMLRPCServer logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s') with open(PIDFILE, 'w') as pidfile: pidfile.write('%s' % os.getpid()) try: # Create... | def run_xmlrpc_server(): '''Run an XMLRPC server that publishes the translate_stacktrace function.''' from DocXMLRPCServer import DocXMLRPCServer as XMLRPCServer logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s') with open(PIDFILE, 'w') as pidfile: pidfile.write('%s' % os.getpid()) try: # Create... | 455,446 |
def detect_version_details(infolog): '''\ Detect config, branch, rev from version string(s) in infolog. >>> detect_version_details('Spring 0.81+.0.0 (0.81.2.1-1059-g7937d00) has crashed.') ('default', 'master', '0.81.2.1-1059-g7937d00') >>> detect_version_details('Hang detection triggered for Spring 0.81+.0.0 ([debug... | def detect_version_details(infolog): '''\ Detect config, branch, rev from version string(s) in infolog. >>> detect_version_details('Spring 0.81+.0.0 (0.81.2.1-1059-g7937d00) has crashed.') ('default', 'master', '0.81.2.1-1059-g7937d00') >>> detect_version_details('Hang detection triggered for Spring 0.81+.0.0 ([debug... | 455,447 |
def translate_stacktrace(infolog): '''\ Translate a complete stacktrace to (filename, lineno) tuples. The input string may be a complete infolog (i.e. infolog.txt). At the very least it must contain the 'Spring XXX has crashed.' or 'Hang detection triggered for Spring XXX.' line and at least one stack frame. The outp... | def translate_stacktrace(infolog): '''\ Translate a complete stacktrace to (filename, lineno) tuples. The input string may be a complete infolog (i.e. infolog.txt). At the very least it must contain the 'Spring XXX has crashed.' or 'Hang detection triggered for Spring XXX.' line and at least one stack frame. The outp... | 455,448 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,449 |
def CheckHeadersAndLibraries(env, conf): print "\nChecking headers and libraries" boost_common = Dependency([], ['boost/cstdint.hpp']) boost_thread = Dependency(['boost_thread'], ['boost/thread.hpp']) boost_regex = Dependency(['boost_regex'], ['boost/regex.hpp']) boost_serial = Dependency([], ['boost/serialization/... | def CheckHeadersAndLibraries(env, conf): print "\nChecking headers and libraries" boost_common = Dependency([], ['boost/cstdint.hpp']) boost_thread = Dependency(['boost_thread'], ['boost/thread.hpp']) boost_regex = Dependency(['boost_regex'], ['boost/regex.hpp']) boost_serial = Dependency([], ['boost/serialization/... | 455,450 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,451 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,452 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,453 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,454 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,455 |
# !ifdef INSTALL | # !ifdef INSTALL | 455,456 |
def GetDirs(path, dirs): dirs[path] = [] filelist = os.listdir(path) for f in filelist: fullname = path + f if os.path.isdir(fullname): if (f != 'Config') and (f != '.svn'): fullname = fullname + '/' GetDirs(fullname, dirs) else: dirs[path].append(f) | def GetDirs(path, dirs): dirs[path] = [] filelist = os.listdir(path) for f in filelist: fullname = path + f if os.path.isdir(fullname): if (f != 'Config') and (f != '.git'): fullname = fullname + '/' GetDirs(fullname, dirs) else: dirs[path].append(f) | 455,457 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,458 |
print('!ifdef INSTALL') | print('!ifdef INSTALL') | 455,459 |
def ProcessLines(lines): random.shuffle(DEV_NAME_COLORS) nlines = "" onames = {} for line in lines: match = re.search(DEV_NAME_PATTERN, line) if (match == None): continue oname = match.group(0) oname = oname[1: -1] if (not onames.has_key(oname)): nname = oname for n in DEV_NAME_LIST: if (oname.find(n) >= 0): nnam... | def ProcessLines(lines): random.shuffle(DEV_NAME_COLORS) nlines = "" onames = {} for line in lines: match = re.search(DEV_NAME_PATTERN, line) if (match == None): continue oname = match.group(0) oname = oname[1: -1] if (not onames.has_key(oname)): nname = oname for n in DEV_NAME_LIST: if (oname.find(n) >= 0): nnam... | 455,460 |
def ProcessLines(lines): random.shuffle(DEV_NAME_COLORS) nlines = "" onames = {} for line in lines: match = re.search(DEV_NAME_PATTERN, line) if (match == None): continue oname = match.group(0) oname = oname[1: -1] if (not onames.has_key(oname)): nname = oname for n in DEV_NAME_LIST: if (oname.find(n) >= 0): nnam... | def ProcessLines(lines): random.shuffle(DEV_NAME_COLORS) nlines = "" onames = {} for line in lines: match = re.search(DEV_NAME_PATTERN, line) if (match == None): continue oname = match.group(0) oname = oname[1: -1] if (not onames.has_key(oname)): nname = oname for n in DEV_NAME_LIST: if (oname.find(n) >= 0): nnam... | 455,461 |
def testCaching( self ): | def testCaching( self ): | 455,462 |
def testPValueComputation( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | def testPValueComputation( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | 455,463 |
def testPValueComputation( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | def testPValueComputation( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | 455,464 |
def testPValueComputation( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | def testPValueComputation( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | 455,465 |
def testPValueComputation( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | def testPValueComputation( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | 455,466 |
def testStats( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | def testStats( self ): annotation_size = 100 workspace_size = 1000 segment_size = 10 | 455,467 |
def dumpStats( coll, section ): if section in options.output_stats or "all" in options.output_stats: coll.outputStats( E.openOutputFile( section ) ) | def dumpStats( coll, section ): if section in options.output_stats or "all" in options.output_stats: coll.outputStats( E.openOutputFile( section ) ) | 455,468 |
def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] )... | def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] )... | 455,469 |
def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] )... | def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] )... | 455,470 |
def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] )... | def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] )... | 455,471 |
def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] )... | def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] )... | 455,472 |
def install(self): | def install(self): | 455,473 |
def build_partitions(self): gtk.gdk.threads_enter() self.window.set_sensitive(False) # "busy" cursor. cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) self.window.window.set_cursor(cursor) from progress import ProgressDialog dialog = ProgressDialog() dialog.show(title=_("Installer"), label=_("Scanning disk %s for partitions") % ... | def build_partitions(self): gtk.gdk.threads_enter() self.window.set_sensitive(False) # "busy" cursor. cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) self.window.window.set_cursor(cursor) from progress import ProgressDialog dialog = ProgressDialog() dialog.show(title=_("Installer"), label=_("Scanning disk %s for partitions") % ... | 455,474 |
def install(self): | def install(self): | 455,475 |
def install(self): ''' Install this baby to disk ''' # mount the media location. print " --> Installation started" try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(... | def install(self): ''' Install this baby to disk ''' # mount the media location. print " --> Installation started" try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(... | 455,476 |
def draw(self, cr, width, height): #self.style.apply_default_background(self.window, True, gtk.STATE_NORMAL, None, 0, 0, width, height) #cr.set_source_rgba(0, 0, 0, 0.0) self.width = width # for add_label self.height = height # for add_label height /= 2 width -= 40 #cr.rectangle(0, 0, width, height) #cr.fill() | def draw(self, cr, width, height): #self.style.apply_default_background(self.window, True, gtk.STATE_NORMAL, None, 0, 0, width, height) #cr.set_source_rgba(0, 0, 0, 0.0) self.width = width # for add_label self.height = height # for add_label height /= 2 width -= 40 #cr.rectangle(0, 0, width, height) #cr.fill() | 455,477 |
def draw(self, cr, width, height): #self.style.apply_default_background(self.window, True, gtk.STATE_NORMAL, None, 0, 0, width, height) #cr.set_source_rgba(0, 0, 0, 0.0) self.width = width # for add_label self.height = height # for add_label height /= 2 width -= 40 #cr.rectangle(0, 0, width, height) #cr.fill() | def draw(self, cr, width, height): #self.style.apply_default_background(self.window, True, gtk.STATE_NORMAL, None, 0, 0, width, height) #cr.set_source_rgba(0, 0, 0, 0.0) self.width = width # for add_label self.height = height # for add_label height /= 2 width -= 40 #cr.rectangle(0, 0, width, height) #cr.fill() | 455,478 |
def draw(self, cr, width, height): #self.style.apply_default_background(self.window, True, gtk.STATE_NORMAL, None, 0, 0, width, height) #cr.set_source_rgba(0, 0, 0, 0.0) self.width = width # for add_label self.height = height # for add_label height /= 2 width -= 40 #cr.rectangle(0, 0, width, height) #cr.fill() | def draw(self, cr, width, height): #self.style.apply_default_background(self.window, True, gtk.STATE_NORMAL, None, 0, 0, width, height) #cr.set_source_rgba(0, 0, 0, 0.0) self.width = width # for add_label self.height = height # for add_label height /= 2 width -= 40 #cr.rectangle(0, 0, width, height) #cr.fill() | 455,479 |
def draw(self, cr, width, height): #self.style.apply_default_background(self.window, True, gtk.STATE_NORMAL, None, 0, 0, width, height) #cr.set_source_rgba(0, 0, 0, 0.0) self.width = width # for add_label self.height = height # for add_label height /= 2 width -= 40 #cr.rectangle(0, 0, width, height) #cr.fill() | def draw(self, cr, width, height): #self.style.apply_default_background(self.window, True, gtk.STATE_NORMAL, None, 0, 0, width, height) #cr.set_source_rgba(0, 0, 0, 0.0) self.width = width # for add_label self.height = height # for add_label height /= 2 width -= 40 #cr.rectangle(0, 0, width, height) #cr.fill() | 455,480 |
def __init__(self): self.resource_dir = '/usr/share/live-installer/' #self.glade = 'interface.glade' self.glade = os.path.join(self.resource_dir, 'interface.glade') self.wTree = gtk.glade.XML(self.glade, 'main_window') | def __init__(self): self.resource_dir = '/usr/share/live-installer/' #self.glade = 'interface.glade' self.glade = os.path.join(self.resource_dir, 'interface.glade') self.wTree = gtk.glade.XML(self.glade, 'main_window') | 455,481 |
def __init__(self): self.resource_dir = '/usr/share/live-installer/' #self.glade = 'interface.glade' self.glade = os.path.join(self.resource_dir, 'interface.glade') self.wTree = gtk.glade.XML(self.glade, 'main_window') | def __init__(self): self.resource_dir = '/usr/share/live-installer/' #self.glade = 'interface.glade' self.glade = os.path.join(self.resource_dir, 'interface.glade') self.wTree = gtk.glade.XML(self.glade, 'main_window') | 455,482 |
def build_disk_list(self): model = gtk.ListStore(str,str,bool,str,str,bool) model2 = gtk.ListStore(str) pro = subprocess.Popen("parted -lms", stdout=subprocess.PIPE, shell=True) last_name = "" for line in pro.stdout: line = line.rstrip("\r\n") if ":" in line: split = line.split(":") if(len(split) <= 3): continue if(lin... | def build_disk_list(self): model = gtk.ListStore(str,str,bool,str,str,bool) model2 = gtk.ListStore(str) pro = subprocess.Popen("parted -lms", stdout=subprocess.PIPE, shell=True) last_name = "" for line in pro.stdout: line = line.rstrip("\r\n") if ":" in line: split = line.split(":") if(len(split) <= 3): continue if(lin... | 455,483 |
def build_disk_list(self): model = gtk.ListStore(str,str,bool,str,str,bool) model2 = gtk.ListStore(str) pro = subprocess.Popen("parted -lms", stdout=subprocess.PIPE, shell=True) last_name = "" for line in pro.stdout: line = line.rstrip("\r\n") if ":" in line: split = line.split(":") if(len(split) <= 3): continue if(lin... | def build_disk_list(self): model = gtk.ListStore(str,str,bool,str,str,bool) model2 = gtk.ListStore(str) pro = subprocess.Popen("parted -lms", stdout=subprocess.PIPE, shell=True) last_name = "" for line in pro.stdout: line = line.rstrip("\r\n") if ":" in line: split = line.split(":") if(len(split) <= 3): continue if(lin... | 455,484 |
def build_disk_list(self): model = gtk.ListStore(str,str,bool,str,str,bool) model2 = gtk.ListStore(str) pro = subprocess.Popen("parted -lms", stdout=subprocess.PIPE, shell=True) last_name = "" for line in pro.stdout: line = line.rstrip("\r\n") if ":" in line: split = line.split(":") if(len(split) <= 3): continue if(lin... | def build_disk_list(self): model = gtk.ListStore(str,str,bool,str,str,bool) model2 = gtk.ListStore(str) pro = subprocess.Popen("parted -lms", stdout=subprocess.PIPE, shell=True) last_name = "" for line in pro.stdout: line = line.rstrip("\r\n") if ":" in line: split = line.split(":") if(len(split) <= 3): continue if(lin... | 455,485 |
def do_install(self): ''' Actually perform the installation .. ''' inst = self.installer # Create fstab files = fstab() model = self.wTree.get_widget("treeview_disks").get_model() for row in model: if(row[2] or row[3] is not None): # format or mountpoint specified. files.add_mount(device=row[0], mountpoint=row[3], fil... | defsys.exit(0) do_install(self):sys.exit(0) '''sys.exit(0) Actuallysys.exit(0) performsys.exit(0) thesys.exit(0) installationsys.exit(0) ..sys.exit(0) '''sys.exit(0) instsys.exit(0) =sys.exit(0) self.installersys.exit(0) sys.exit(0) #sys.exit(0) Createsys.exit(0) fstabsys.exit(0) filessys.exit(0) =sys.exit(0) fstab()sy... | 455,486 |
def do_install(self): ''' Actually perform the installation .. ''' inst = self.installer # Create fstab files = fstab() model = self.wTree.get_widget("treeview_disks").get_model() for row in model: if(row[2] or row[3] is not None): # format or mountpoint specified. files.add_mount(device=row[0], mountpoint=row[3], fil... | def do_install(self): ''' Actually perform the installation .. ''' inst = self.installer # Create fstab files = fstab() model = self.wTree.get_widget("treeview_disks").get_model() for row in model: if(row[2] or row[3] is not None): # format or mountpoint specified. files.add_mount(device=row[0], mountpoint=row[3], fil... | 455,487 |
def install(self): ''' Install this baby to disk ''' # mount the media location. try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(root)): print _("Base filesystem d... | def install(self): ''' Install this baby to disk ''' # mount the media location. try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(root)): print _("Base filesystem d... | 455,488 |
def install(self): ''' Install this baby to disk ''' # mount the media location. try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(root)): print _("Base filesystem d... | def install(self): ''' Install this baby to disk ''' # mount the media location. try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(root)): print _("Base filesystem d... | 455,489 |
def install(self): ''' Install this baby to disk ''' # mount the media location. try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(root)): print _("Base filesystem d... | def install(self): ''' Install this baby to disk ''' # mount the media location. try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(root)): print _("Base filesystem d... | 455,490 |
def install(self): ''' Install this baby to disk ''' # mount the media location. try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(root)): print _("Base filesystem d... | def install(self): ''' Install this baby to disk ''' # mount the media location. try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(root)): print _("Base filesystem d... | 455,491 |
def build_partitions(self): gtk.gdk.threads_enter() self.window.set_sensitive(False) # "busy" cursor. cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) self.window.window.set_cursor(cursor) gtk.gdk.threads_leave() from progress import ProgressDialog dialog = ProgressDialog() dialog.show(title=_("Installer"), label=_("Scanning dis... | def build_partitions(self): gtk.gdk.threads_enter() self.window.set_sensitive(False) # "busy" cursor. cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) self.window.window.set_cursor(cursor) from progress import ProgressDialog dialog = ProgressDialog() dialog.show(title=_("Installer"), label=_("Scanning disk %s for partitions") % ... | 455,492 |
def build_disks(self): import subprocess self.disks = {} inxi = subprocess.Popen("inxi -c0 -D", shell=True, stdout=subprocess.PIPE) parent = None for line in inxi.stdout: line = line.rstrip("\r\n") if(line.startswith("Disks:")): line = line.replace("Disks:", "") device = None section = line.split(":")[2].strip(" ") if(... | def build_disks(self): import subprocess self.disks = {} inxi = subprocess.Popen("inxi -c0 -D", shell=True, stdout=subprocess.PIPE) parent = None for line in inxi.stdout: line = line.rstrip("\r\n") if(line.startswith("Disks:")): line = line.replace("Disks:", "") device = None sections = line.split(":") for section in s... | 455,493 |
def install(self): ''' Install this baby to disk ''' # mount the media location. print " --> Installation started" try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(... | def install(self): ''' Install this baby to disk ''' # mount the media location. print " --> Installation started" try: if(not os.path.exists("/target")): os.mkdir("/target") if(not os.path.exists("/source")): os.mkdir("/source") # find the squashfs.. root = self.media root_type = self.media_type if(not os.path.exists(... | 455,494 |
def build_disks(self): gtk.gdk.threads_enter() import subprocess self.disks = {} inxi = subprocess.Popen("inxi -c0 -D", shell=True, stdout=subprocess.PIPE) parent = None for line in inxi.stdout: line = line.rstrip("\r\n") if(line.startswith("Disks:")): line = line.replace("Disks:", "") device = None sections = line.spl... | def build_disks(self): gtk.gdk.threads_enter() import subprocess self.disks = {} inxi = subprocess.Popen("inxi -c0 -D", shell=True, stdout=subprocess.PIPE) parent = None for line in inxi.stdout: line = line.rstrip("\r\n") if(line.startswith("Disks:")): line = line.replace("Disks:", "") device = None sections = line.spl... | 455,495 |
def build_disks(self): gtk.gdk.threads_enter() import subprocess self.disks = {} inxi = subprocess.Popen("inxi -c0 -D", shell=True, stdout=subprocess.PIPE) parent = None for line in inxi.stdout: line = line.rstrip("\r\n") if(line.startswith("Disks:")): line = line.replace("Disks:", "") device = None sections = line.spl... | def build_disks(self): gtk.gdk.threads_enter() import subprocess self.disks = {} inxi = subprocess.Popen("inxi -c0 -D", shell=True, stdout=subprocess.PIPE) parent = None for line in inxi.stdout: line = line.rstrip("\r\n") if(line.startswith("Disks:")): line = line.replace("Disks:", "") device = None sections = line.spl... | 455,496 |
def build_disks(self): gtk.gdk.threads_enter() import subprocess self.disks = {} inxi = subprocess.Popen("inxi -c0 -D", shell=True, stdout=subprocess.PIPE) parent = None for line in inxi.stdout: line = line.rstrip("\r\n") if(line.startswith("Disks:")): line = line.replace("Disks:", "") device = None sections = line.spl... | def build_disks(self): gtk.gdk.threads_enter() import subprocess self.disks = {} inxi = subprocess.Popen("inxi -c0 -D", shell=True, stdout=subprocess.PIPE) parent = None for line in inxi.stdout: line = line.rstrip("\r\n") if(line.startswith("Disks:")): line = line.replace("Disks:", "") device = None sections = line.spl... | 455,497 |
def build_partitions(self): gtk.gdk.threads_enter() self.window.set_sensitive(False) # "busy" cursor. cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) self.window.window.set_cursor(cursor) from progress import ProgressDialog dialog = ProgressDialog() dialog.show(title=_("Installer"), label=_("Scanning disk %s for partitions") % ... | def build_partitions(self): gtk.gdk.threads_enter() self.window.set_sensitive(False) # "busy" cursor. cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) self.window.window.set_cursor(cursor) from progress import ProgressDialog dialog = ProgressDialog() dialog.show(title=_("Installer"), label=_("Scanning disk %s for partitions") % ... | 455,498 |
def build_partitions(self): gtk.gdk.threads_enter() self.window.set_sensitive(False) # "busy" cursor. cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) self.window.window.set_cursor(cursor) from progress import ProgressDialog dialog = ProgressDialog() dialog.show(title=_("Installer"), label=_("Scanning disk %s for partitions") % ... | def build_partitions(self): gtk.gdk.threads_enter() self.window.set_sensitive(False) # "busy" cursor. cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) self.window.window.set_cursor(cursor) from progress import ProgressDialog dialog = ProgressDialog() dialog.show(title=_("Installer"), label=_("Scanning disk %s for partitions") % ... | 455,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.