rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
reactor.spawnProcess(p, sys.executable, cmds, env=None) | reactor.spawnProcess(p, sys.executable, cmds, env={}) | def execute(self, args, p, preargs=''): if runtime.platformType == 'win32': raise unittest.SkipTest, "can't run cmdline client on win32" port = self.server.getHost().port cmd = ('-p %i -l testuser ' '--known-hosts kh_test ' '--user-authentications publickey ' '--host-key-algorithms ssh-rsa ' '-a -I ' '-K direct ' '-i d... | 25136b6da0a4cc78083f453648d9d96e9dd1c1be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/25136b6da0a4cc78083f453648d9d96e9dd1c1be/test_conch.py |
util.spinWhile(lambda: not p.done) | util.spinWhile(lambda: not p.done, timeout=10) | def execute(self, args, p, preargs=''): if runtime.platformType == 'win32': raise unittest.SkipTest, "can't run cmdline client on win32" port = self.server.getHost().port cmd = ('-p %i -l testuser ' '--known-hosts kh_test ' '--user-authentications publickey ' '--host-key-algorithms ssh-rsa ' '-a -I ' '-K direct ' '-i d... | 25136b6da0a4cc78083f453648d9d96e9dd1c1be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/25136b6da0a4cc78083f453648d9d96e9dd1c1be/test_conch.py |
connect.connect(o['host'], int(o['port']), o, vhk, uao) util.spinWhile(lambda: not p.done) | d = connect.connect(o['host'], int(o['port']), o, vhk, uao) d.addErrback(lambda f: unittest.fail('Failure connecting to test server: %s' % f)) util.spinWhile(lambda: not p.done, timeout=10) | def _(host, *args): o['host'] = host | 25136b6da0a4cc78083f453648d9d96e9dd1c1be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/25136b6da0a4cc78083f453648d9d96e9dd1c1be/test_conch.py |
process[controller.submodel] = data | process[node.getAttribute('name')] = data | def handleSuccesses(self, request, successes): print "There were successes: ", successes process = {} for controller, data, node in successes: process[controller.submodel] = data return process | 211f901d2acd41310c536a38814bd1e676c50800 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/211f901d2acd41310c536a38814bd1e676c50800/domtemplate.py |
DIRTY_REACTOR_MSG = "reactor left in unclean state, the following Selectables were left over: " | DIRTY_REACTOR_MSG = "THIS WILL BECOME AN ERROR SOON! reactor left in unclean state, the following Selectables were left over: " | def __init__(self, original): self.value = [original] | e19d680b7faea5fc1bad31384d96595d40382d6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e19d680b7faea5fc1bad31384d96595d40382d6c/util.py |
raise DirtyReactorError, s | warnings.warn(s, DirtyReactorError) | def do_cleanReactor(cls): s = None if interfaces.IReactorCleanup.providedBy(reactor): junk = reactor.cleanup() if junk: s = DIRTY_REACTOR_MSG + repr([repr(obj) for obj in junk]) if s is not None: raise DirtyReactorError, s | e19d680b7faea5fc1bad31384d96595d40382d6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e19d680b7faea5fc1bad31384d96595d40382d6c/util.py |
self._adapterCache[interfaceClass] = adapterClass() | self._adapterCache[interfaceClass] = adapterClass(self) def removeComponent(self, interfaceClass): del self._adapterCache[interfaceClass] | def setAdapter(self, interfaceClass, adapterClass): self._adapterCache[interfaceClass] = adapterClass() | c05c11c82e27049d127ac9dcba399e43d08471ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c05c11c82e27049d127ac9dcba399e43d08471ae/components.py |
txt = data.getSubmodel("text").getData(request) | txt = data.getSubmodel(request, "text").getData(request) | def setUp(self, request, node, data): # TODO: we ought to support Deferreds here for both text and href! if isinstance(data, StringType): node.tagName = self.tagName node.attributes["href"] = data else: data = self.model txt = data.getSubmodel("text").getData(request) if not isinstance(txt, Node): txt = document.create... | 740e188dd7e11854cac9139d2df53a72e09bb9b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/740e188dd7e11854cac9139d2df53a72e09bb9b9/widgets.py |
lnk = data.getSubmodel("href").getData(request) | lnk = data.getSubmodel(request, "href").getData(request) | def setUp(self, request, node, data): # TODO: we ought to support Deferreds here for both text and href! if isinstance(data, StringType): node.tagName = self.tagName node.attributes["href"] = data else: data = self.model txt = data.getSubmodel("text").getData(request) if not isinstance(txt, Node): txt = document.create... | 740e188dd7e11854cac9139d2df53a72e09bb9b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/740e188dd7e11854cac9139d2df53a72e09bb9b9/widgets.py |
timeout = main.runUntilCurrent() if timeout is not None: _simtag = gtk.timeout_add(timeout * 1010, simulate) | timeout = main.runUntilCurrent() or 0.1 _simtag = gtk.timeout_add(timeout * 1010, simulate) | def simulate(): """Run simulation loops and reschedule callbacks. """ global _simtag if _simtag is not None: gtk.timeout_remove(_simtag) timeout = main.runUntilCurrent() if timeout is not None: _simtag = gtk.timeout_add(timeout * 1010, simulate) # grumble | f5c5e01ecefa0701852dad3c55e9bea33f9a3a82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f5c5e01ecefa0701852dad3c55e9bea33f9a3a82/ingtkernet.py |
childNodes = iNode.childNodes[:] gathered = [] while childNodes: node = childNodes.pop(0) if node.childNodes: [childNodes.insert(0, ch_node) for ch_node in node.childNodes] if hasattr(node, 'nodeValue') and node.nodeValue is not None: gathered.append(node.nodeValue) gathered.reverse() | gathered=[] slice=[iNode] while len(slice)>0: c=slice.pop(0) if hasattr(c, 'nodeValue') and c.nodeValue is not None: gathered.append(c.nodeValue) slice=c.childNodes+slice | def gatherTextNodes(iNode): """Visit each child node and collect its text data, if any, into a string. | 91ff2d1a14f4b7f8951b7c1a8d4c5aa8ca917a4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/91ff2d1a14f4b7f8951b7c1a8d4c5aa8ca917a4a/domhelpers.py |
def gatherTextNodes(iNode): """Visit each child node and collect its text data, if any, into a string. | 91ff2d1a14f4b7f8951b7c1a8d4c5aa8ca917a4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/91ff2d1a14f4b7f8951b7c1a8d4c5aa8ca917a4a/domhelpers.py | ||
os.path.walk(basePath, self.addFiles, None) def addFiles(self, arg, path, files): path = path.replace(self.basePath, '') for file in files: file = os.path.join(path, file) module = (file.replace('.py.html', '') .replace('/', '.')) self.stuff[module] = self.baseURL + file | for file in glob.glob(os.path.join(basePath, "*.html")): file = os.path.basename(file) module = file[:-len('.html')].split('.') for i in range(len(module)-1): self.stuff['.'.join(module[i:])] = self.baseURL+file | def __init__(self, basePath, baseURL): self.stuff = {} self.basePath = basePath self.baseURL = baseURL os.path.walk(basePath, self.addFiles, None) | 532695dd3d62cd594c2858e697effde46fa8d5dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/532695dd3d62cd594c2858e697effde46fa8d5dc/tree.py |
if not '.' in name: raise ValueError("Gimme more than just *%s* to work with, " "will ya?!?" % name) name = '.*' + name.replace('.', '\.') + "\.html$" pat = re.compile(name) for k,v in self.stuff.items(): if pat.match(k): return v | ret = self.stuff.get(name) if ret: return ret parts = name.split('.') if len(parts)>1: return self.stuff.get('.'.join(parts[:-1])) | def match(self, name): """ I take a fully-qualified *or* relative module or class-name, and return an URL to the Twisted API documentation for that name. """ # Evil is fun. if not '.' in name: raise ValueError("Gimme more than just *%s* to work with, " "will ya?!?" % name) name = '.*' + name.replace('.', '\.') + "\.htm... | 532695dd3d62cd594c2858e697effde46fa8d5dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/532695dd3d62cd594c2858e697effde46fa8d5dc/tree.py |
if not (href.startswith("http://") or href.startswith("mailto:")): | if '/' not in href and href.endswith('.html'): | def fixLinks(document, ext): for node in domhelpers.findElementsWithAttribute(document, 'href'): href = node.getAttribute("href") if not (href.startswith("http://") or href.startswith("mailto:")): fname = os.path.splitext(href) if len(fname) == 2 and fname[1] == '.html': node.setAttribute("href", fname[0] + ext) | 532695dd3d62cd594c2858e697effde46fa8d5dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/532695dd3d62cd594c2858e697effde46fa8d5dc/tree.py |
if len(fname) == 2 and fname[1] == '.html': node.setAttribute("href", fname[0] + ext) | node.setAttribute("href", fname[0] + ext) | def fixLinks(document, ext): for node in domhelpers.findElementsWithAttribute(document, 'href'): href = node.getAttribute("href") if not (href.startswith("http://") or href.startswith("mailto:")): fname = os.path.splitext(href) if len(fname) == 2 and fname[1] == '.html': node.setAttribute("href", fname[0] + ext) | 532695dd3d62cd594c2858e697effde46fa8d5dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/532695dd3d62cd594c2858e697effde46fa8d5dc/tree.py |
hosts, hostKeyType, encodedKey = line.split() | try: hosts, hostKeyType, encodedKey = line.split() except ValueError: continue | def isInKnownHosts(self, host, pubKey): """checks to see if host is in the known_hosts file for the user. returns 0 if it isn't, 1 if it is and is the same, 2 if it's changed. """ keyType = common.getNS(pubKey)[0] retVal = 0 try: known_hosts = open(os.path.expanduser('~/.ssh/known_hosts')) except IOError: return 0 for ... | 57d3fdc79a8ae430dca508cfe22c7fd35afd24e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/57d3fdc79a8ae430dca508cfe22c7fd35afd24e4/conch.py |
return "<pre>"+escapehtml(text)+"</pre>" | return "<pre>"+escape(text)+"</pre>" | def PRE(text): "Wrap <pre> tags around some text and escape it with web.escapehtml." return "<pre>"+escapehtml(text)+"</pre>" | 5863fed7f4545fedbe15a1b56a47d0506235098d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5863fed7f4545fedbe15a1b56a47d0506235098d/html.py |
if namespace != self.namespace: | if namespace != self.namespace and self.namespace: | def writexml(self, stream, indent='', addindent='', newl='', strip=0, nsprefixes={}, namespace=''): # write beginning ALLOWSINGLETON = ('img', 'br', 'hr', 'base', 'meta', 'link', 'param', 'area', 'input', 'col', 'basefont', 'isindex', 'frame') BLOCKELEMENTS = ('html', 'head', 'body', 'noscript', 'ins', 'del', 'h1', 'h2... | 1cd4321527b7bdd2466f9f5041d8d5aae5d3a016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1cd4321527b7bdd2466f9f5041d8d5aae5d3a016/microdom.py |
output.reportError(testClass, method, e) | def runOneTest(self, testClass, testCase, method, output): ok = 0 try: testCase.setUp() method(testCase) except AssertionError, e: output.reportFailure(testClass, method, sys.exc_info()) except KeyboardInterrupt: raise except SkipTest: output.reportSkip(testClass, method, sys.exc_info()) except: output.reportError(test... | 5ac304fcf1b978c3a1758566f3b34eefc2a2084d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5ac304fcf1b978c3a1758566f3b34eefc2a2084d/unittest.py | |
newQueue.append(seconds - now, func, args, kw) | newQueue.append([seconds - now, func, args, kw]) | def __getstate__(self): """Save state by storing all callback timeouts as differences from the current time. """ now = time() newQueue = [] for seconds, func, args, kw in self.queue: newQueue.append(seconds - now, func, args, kw) return {'queue': newQueue} | 98c025a8890e7ed8bedf8a20fb735d62d04c2044 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/98c025a8890e7ed8bedf8a20fb735d62d04c2044/delay.py |
for fn in filter(lambda n: callable(getattr(self,n)) and n.startswith('decode_'), dir(self)): setattr(self, fn.replace('decode','handle'), self.resultHarvester) | for fn in reflect.prefixedMethodNames(self.__class__, 'decode_'): setattr(self, 'handle_' + fn, self.resultHarvester) | def connectionMade(self): self.resultHarvester = ResultHarvester() for fn in filter(lambda n: callable(getattr(self,n)) and n.startswith('decode_'), dir(self)): setattr(self, fn.replace('decode','handle'), self.resultHarvester) | 788a399957b8d4dd9bcd5228af99f4d70d6706be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/788a399957b8d4dd9bcd5228af99f4d70d6706be/test_nmea.py |
options['gid'] = pwd.getpwnam(options['gid'])[3] | options['gid'] = grp.getgrnam(options['gid'])[2] | def run(): tapLookup = loadPlugins() options = GeneralOptions(tapLookup) if hasattr(os, 'getgid'): options['uid'] = os.getuid() options['gid'] = os.getgid() try: options.parseOptions(sys.argv[1:]) # XXX - Yea, this is FILTH FILTH FILTH if options['debug'] or options['progress']: tapLookup = loadPlugins(options['debug']... | 7a09c919cf8ac455003220b8d84f447653c13f8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7a09c919cf8ac455003220b8d84f447653c13f8d/mktap.py |
setup_args = {"scripts": [scriptfile], | setup_args = {"service": [serviceModule], "scripts": [scriptfile], | def run(argv = sys.argv): setup_args = {"scripts": [scriptfile], "data_files": [("", [configfile]), ], } orig_argv = sys.argv sys.argv = argv setup(**setup_args) sys.argv = orig_argv | 25dff17d8694922483fd5b10edcb371fc2c4857e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/25dff17d8694922483fd5b10edcb371fc2c4857e/tap2ntsvc.py |
service=%(name)s_ServiceControl | def run(argv = sys.argv): setup_args = {"scripts": [scriptfile], "data_files": [("", [configfile]), ], } orig_argv = sys.argv sys.argv = argv setup(**setup_args) sys.argv = orig_argv | 25dff17d8694922483fd5b10edcb371fc2c4857e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/25dff17d8694922483fd5b10edcb371fc2c4857e/tap2ntsvc.py | |
version_productversion = %(package_version)s icon = %(icon)s version_filedescription = %(description)s version_productname = %(display_name)s | description = %(description)s | def run(argv = sys.argv): setup_args = {"scripts": [scriptfile], "data_files": [("", [configfile]), ], } orig_argv = sys.argv sys.argv = argv setup(**setup_args) sys.argv = orig_argv | 25dff17d8694922483fd5b10edcb371fc2c4857e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/25dff17d8694922483fd5b10edcb371fc2c4857e/tap2ntsvc.py |
scr.collect(os.path.join("dist", "%(name)ssvc")) | scr.collect('dist') | def SvcStop(self): self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) from twisted.internet import reactor reactor.callFromThread(reactor.stop) | 25dff17d8694922483fd5b10edcb371fc2c4857e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/25dff17d8694922483fd5b10edcb371fc2c4857e/tap2ntsvc.py |
host = string.lower(request.getHeader('host')) | host = string.split(string.lower(request.getHeader('host')),':')[0] | def _getResourceForRequest(self, request): """(Internal) Get the appropriate resource for the given host. """ host = string.lower(request.getHeader('host')) return self.hosts.get(host, error.NoResource("host %s not in vhost map" % repr(host))) | 153e52a387ead8388267cc1afd6451408ab62354 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/153e52a387ead8388267cc1afd6451408ab62354/vhost.py |
for callback, errback in self.awaitingPerspectives.values(): | for perspective, username, password, referenced, callback, errback in self.expq: | def connectionFailed(self): """The connection failed; bail on any awaiting perspective requests. """ for callback, errback in self.awaitingPerspectives.values(): try: errback() except: traceback.print_exc(file=log.logfile) | 44160875676a7c5d8434a2b3a7281bbff7180cb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/44160875676a7c5d8434a2b3a7281bbff7180cb5/pb.py |
self.waitingForAnswers = None | def connectionLost(self): """The connection was lost. """ self.disconnected = 1 # nuke potential circular references. for perspective, client in self.perspectives.values(): try: perspective.detached(client) except: log.msg("Exception in perspective detach ignored:") traceback.print_exc(file=log.logfile) self.perspectiv... | 44160875676a7c5d8434a2b3a7281bbff7180cb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/44160875676a7c5d8434a2b3a7281bbff7180cb5/pb.py | |
exitCode = self.status >> 8 | exitCode = os.WEXITSTATUS(self.status) | def maybeCallProcessEnded(self): if self.lostProcess == 2: try: if self.status != -1: exitCode = self.status >> 8 else: exitCode = None # wonder when this happens if exitCode: self.proto.processEnded(failure.Failure(error.ProcessTerminated(exitCode))) else: self.proto.processEnded(failure.Failure(error.ProcessDone())) ... | 6fea7500e05cc0ceb9928a4bad200eec0cfdebf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6fea7500e05cc0ceb9928a4bad200eec0cfdebf4/process.py |
raise ConchError('could not get next service: %s'%self.nextService) | raise error.ConchError('could not get next service: %s' % self.nextService) | def _cbFinishedAuth(self, (interface, avatar, logout)): self.transport.isAuthorized = True service = self.transport.factory.getService(self.transport, self.nextService) if not service: raise ConchError('could not get next service: %s'%self.nextService) log.msg('%s authenticated with %s' % (self.user, self.method)) if s... | a3eccd85859a5674dc5e61cd9c695155d78e9b8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a3eccd85859a5674dc5e61cd9c695155d78e9b8f/userauth.py |
if self.context.pending(): self.context.iteration(0) | if gtk.events_pending(): gtk.main_iteration(0) | def doIteration(self, delay): # flush some pending events, return if there was something to do # don't use the usual "while self.context.pending(): self.context.iteration()" # idiom because lots of IO (in particular test_tcp's # ProperlyCloseFilesTestCase) can keep us from ever exiting. log.msg(channel='system', event=... | 13a01a74bca3abff8a5de907cbe6365634ede1b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/13a01a74bca3abff8a5de907cbe6365634ede1b7/gtk2reactor.py |
self.context.iteration(1) | gtk.main_iteration(1) | def doIteration(self, delay): # flush some pending events, return if there was something to do # don't use the usual "while self.context.pending(): self.context.iteration()" # idiom because lots of IO (in particular test_tcp's # ProperlyCloseFilesTestCase) can keep us from ever exiting. log.msg(channel='system', event=... | 13a01a74bca3abff8a5de907cbe6365634ede1b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/13a01a74bca3abff8a5de907cbe6365634ede1b7/gtk2reactor.py |
if sys.modules.has_key("gtk"): | if True: | def run(self, installSignalHandlers=1): self.startRunning(installSignalHandlers=installSignalHandlers) self.simulate() if sys.modules.has_key("gtk"): import gtk self.__crash = gtk.main_quit gtk.main() else: self.__crash = self.loop.quit self.loop.run() | 13a01a74bca3abff8a5de907cbe6365634ede1b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/13a01a74bca3abff8a5de907cbe6365634ede1b7/gtk2reactor.py |
zope.interface(portal.IRealm) | implements(portal.IRealm) | def perspective_watch(self, identifier): """Watch the object obtained by evaluating the identifier. | d99ea00b3d67811a72dcb6fa984168703f735f26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d99ea00b3d67811a72dcb6fa984168703f735f26/service.py |
def getObject(self): if self.path: testOb = PathReferenceContext([self.path[0]], self.root).getObject() if testOb.__module__ == 'twisted.web.error': self.path.pop(0) return self.request.site.getResourceFor(self) | def getObject(self): # fix for t.w.distrib, where the first path segment doesn't point to a file on disk if self.path: testOb = PathReferenceContext([self.path[0]], self.root).getObject() if testOb.__module__ == 'twisted.web.error': self.path.pop(0) # Use the loop in site.getRequestFor # It may implement caching in the... | 49abcf96d273139d5a1f50a5479f7b1f95e7c8ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/49abcf96d273139d5a1f50a5479f7b1f95e7c8ab/refpath.py | |
raise SkipTest("This test runs an external process. " "This reactor doesn't support it.") | raise unittest.SkipTest("This test runs an external process. " "This reactor doesn't support it.") | def test_actuallyRuns(self): from twisted.internet import interfaces, reactor if not interfaces.IReactorProcess.providedBy(reactor): raise SkipTest("This test runs an external process. " "This reactor doesn't support it.") import test_output, os d = test_output.runTrialWithEnv(os.environ, '--testmodule', sibpath('modul... | 2808da13099b0f6a6be411d8a4ab69beb4b8313c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2808da13099b0f6a6be411d8a4ab69beb4b8313c/test_script.py |
if e.errno != errno.EAGAIN: | if e.errno != errno.WSAEWOULDBLOCK: | def wakeUp(self): """Send a byte to my connection. """ try: util.untilConcludes(self.w.send, 'x') except OSError, e: if e.errno != errno.EAGAIN: raise | c8c56a801b901713167ab02d6ef1357ed734b136 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c8c56a801b901713167ab02d6ef1357ed734b136/posixbase.py |
self.q.put(o) | def dispatch(self, owner, func, *args, **kw): """Dispatch a function to be a run in a thread. owner must be a loggable object. """ assert isinstance(owner, log.Logger), "owner isn't logger" if self.joined: return o=(owner,func,args,kw) self._startSomeWorkers() self.q.put(o) | f73e9f0bb3930b93d334a13cc174532d0446103d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f73e9f0bb3930b93d334a13cc174532d0446103d/threadpool.py | |
signal.signal(signal.SIGINT, lambda *args: pdb.set_trace()) | signal.signal(signal.SIGUSR2, lambda *args: reactor.callLater(0, pdb.set_trace)) | def runReactorWithLogging(config, oldstdout, oldstderr): from twisted.internet import reactor try: if config['profile']: p = profile.Profile() p.runcall(reactor.run) if config['savestats']: p.dump_stats(config['profile']) else: # XXX - omfg python sucks tmp, sys.stdout = sys.stdout, open(config['profile'], 'a') p.print... | 780d1b860f106716a758a698f7d2e3f55bff6ba1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/780d1b860f106716a758a698f7d2e3f55bff6ba1/app.py |
"(implies nodaemon), sending SIGINT will drop into debugger"], | "(implies nodaemon), sending SIGUSR2 will drop into debugger"], | def reportProfile(report_profile, name): if not report_profile: return if name: from twisted.python.dxprofile import report log.msg("Sending DXP stats...") report(report_profile, name) log.msg("DXP stats sent.") else: log.err("--report-profile specified but application has no " "name (--appname unspecified)") | 780d1b860f106716a758a698f7d2e3f55bff6ba1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/780d1b860f106716a758a698f7d2e3f55bff6ba1/app.py |
inst = Dummy() setInstanceState(inst, self.d) self.protocol.setObject(self.count, inst) self.deferred.callback(inst) return inst | obj = self.factory() obj.setCopyableState(self.d) self.protocol.setObject(self.count, obj) self.deferred.callback(obj) return obj | def receiveClose(self): # TODO: TASTE HERE IF YOU WANT TO LIVE! inst = Dummy() #inst.__classname__ = self.classname setInstanceState(inst, self.d) self.protocol.setObject(self.count, inst) self.deferred.callback(inst) return inst | a0261369e6bfc18290805793a4b07e48888ff7c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a0261369e6bfc18290805793a4b07e48888ff7c1/flavors.py |
def __init__(self, reactor, proc, name, fileno): | def __init__(self, reactor, proc, name, fileno, forceReadHack=False): | def __init__(self, reactor, proc, name, fileno): """Initialize, specifying a Process instance to connect to. """ abstract.FileDescriptor.__init__(self, reactor) fdesc.setNonBlocking(fileno) self.proc = proc self.name = name self.fd = fileno | 94d8f38c54e1f43668afd0589704c979ed50d432 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/94d8f38c54e1f43668afd0589704c979ed50d432/process.py |
try: os.read(self.fileno(), 0) except OSError: | if forceReadHack: | def __init__(self, reactor, proc, name, fileno): """Initialize, specifying a Process instance to connect to. """ abstract.FileDescriptor.__init__(self, reactor) fdesc.setNonBlocking(fileno) self.proc = proc self.name = name self.fd = fileno | 94d8f38c54e1f43668afd0589704c979ed50d432 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/94d8f38c54e1f43668afd0589704c979ed50d432/process.py |
writer = ProcessWriter(reactor, self, childFD, parentFD) | writer = ProcessWriter(reactor, self, childFD, parentFD, forceReadHack=True) | def __init__(self, reactor, command, args, environment, path, proto, uid=None, gid=None, childFDs=None): """Spawn an operating-system process. | 94d8f38c54e1f43668afd0589704c979ed50d432 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/94d8f38c54e1f43668afd0589704c979ed50d432/process.py |
node.setAttribute("href", linkrel+node.getAttribute("href")) | href = node.getAttribute('href') if not href.startswith('http'): node.setAttribute("href", linkrel+node.getAttribute("href")) | def fixRelativeLinks(document, linkrel): for node in domhelpers.findElementsWithAttribute(document, "href"): node.setAttribute("href", linkrel+node.getAttribute("href")) | cee1b9aaffbc1beec9c028bc80cec5592337e603 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/cee1b9aaffbc1beec9c028bc80cec5592337e603/tree.py |
if se.args[0] == EISCONN: | if se.args[0] in (EISCONN, EINPROGRESS, EALREADY): | def doConnect(self): """I connect the socket. | 05a714c5e80b23281190308f77ace0d17ff8f420 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/05a714c5e80b23281190308f77ace0d17ff8f420/tcp.py |
elif se.args[0] in (EINPROGRESS, EWOULDBLOCK, EALREADY, EINVAL): | elif se.args[0] in (EWOULDBLOCK, EINVAL): | def doConnect(self): """I connect the socket. | 05a714c5e80b23281190308f77ace0d17ff8f420 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/05a714c5e80b23281190308f77ace0d17ff8f420/tcp.py |
self.passwd = params | def ftp_Pass(self, params): """Authorize the USER and the submitted password """ if not self.user: self.reply('nouser') return self.passwd = params if self.user == self.factory.useranonymous: self.reply('guestok') else: # Authing follows if self.factory.otp: otp = self.factory.userdict[self.user]["otp"] try: otp.authen... | a1b0a28867c5340d0256a345b752823ef2d66ff8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a1b0a28867c5340d0256a345b752823ef2d66ff8/ftp.py | |
anonymous = 0 | anonymous = 1 | def lineReceived(self, line): "Process the input from the client" line = string.strip(line) print repr(line) command = string.split(line) if command == []: self.reply('unknown') return 0 commandTmp, command = command[0], '' for c in commandTmp: if ord(c) < 128: command = command + c command = string.capitalize(command)... | a1b0a28867c5340d0256a345b752823ef2d66ff8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a1b0a28867c5340d0256a345b752823ef2d66ff8/ftp.py |
otp = 1 root = '/usr/bin/local' | otp = 0 root = '/var/www' | def lineReceived(self, line): "Process the input from the client" line = string.strip(line) print repr(line) command = string.split(line) if command == []: self.reply('unknown') return 0 commandTmp, command = command[0], '' for c in commandTmp: if ord(c) < 128: command = command + c command = string.capitalize(command)... | a1b0a28867c5340d0256a345b752823ef2d66ff8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a1b0a28867c5340d0256a345b752823ef2d66ff8/ftp.py |
fixLinks(document, ext) | def munge(document, template, linkrel, d, fullpath, ext, url, config): fixRelativeLinks(template, linkrel) addMtime(template, fullpath) removeH1(document) fixAPI(document, url) fontifyPython(document) addPyListings(document, d) addHTMLListings(document, d) addPlainListings(document, d) fixLinks(document, ext) putInToC(... | ea4e9de27ba1f49a86f4f552594d883b8fe7c348 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/ea4e9de27ba1f49a86f4f552594d883b8fe7c348/tree.py | |
return util.redirectTo(urlpath.URLPath.fromRequest(request).here(), request) | return util.redirectTo(urlpath.URLPath.fromRequest(request).here(), request) | def render(self, request): return util.redirectTo(urlpath.URLPath.fromRequest(request).here(), request) | 6c9cd08c2a231a6ee9a820898634045fac04b330 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6c9cd08c2a231a6ee9a820898634045fac04b330/simpleguard.py |
resource = guardResource(SimpleResource(), checker, anon))) | resource = guardResource(SimpleResource(), [checker, anon]))) | def render(self, request): auth = request.getComponent(Authenticated) if auth: return "hello my friend "+auth.name else: return """ I don't think we've met <a href="perspective-init">login</a> """ | 6c9cd08c2a231a6ee9a820898634045fac04b330 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6c9cd08c2a231a6ee9a820898634045fac04b330/simpleguard.py |
inet, addr, port = self.getHost() | port = self.getHost().port | def prePathURL(self): inet, addr, port = self.getHost() if self.isSecure(): default = 443 else: default = 80 if port == default: hostport = '' else: hostport = ':%d' % port return quote('http%s://%s%s/%s' % ( self.isSecure() and 's' or '', self.getRequestHostname(), hostport, string.join(self.prepath, '/')), "/:") | 94c820c75765d7be69ab65ce2939fa19cfaa9203 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/94c820c75765d7be69ab65ce2939fa19cfaa9203/server.py |
self.transport.write("Authentication failed\n") | self.transport.write("\nAuthentication failed\n") | def _ebLogin(self, failure): self.transport.write("Authentication failed\n") self.transport.write("Username: ") return "User" | 968ceb0acb1314669023ba3a3923149b7aa11bd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/968ceb0acb1314669023ba3a3923149b7aa11bd1/telnet.py |
return "User" | self.state = "User" | def _ebLogin(self, failure): self.transport.write("Authentication failed\n") self.transport.write("Username: ") return "User" | 968ceb0acb1314669023ba3a3923149b7aa11bd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/968ceb0acb1314669023ba3a3923149b7aa11bd1/telnet.py |
def getStateToCopyFor(self, issuer): # This is for distrib compatibility x = {} | 9d3471d69825564ffa264d54a5c1ad49b3703d22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d3471d69825564ffa264d54a5c1ad49b3703d22/compat.py | ||
class _ReferenceableProducerWrapper(pb.Referenceable): def __init__(self, producer): self.producer = producer def remote_resumeProducing(self): self.producer.resumeProducing() def remote_pauseProducing(self): self.producer.pauseProducing() def remote_stopProducing(self): self.producer.stopProducing() class OldRe... | def getSession(self, sessionInterface = None): # Session management if not self.session: # FIXME: make sitepath be something cookiename = string.join(['TWISTED_SESSION'] + self.sitepath, "_") sessionCookie = self.getCookie(cookiename) if sessionCookie: try: self.session = self.site.getSession(sessionCookie) except KeyE... | 9d3471d69825564ffa264d54a5c1ad49b3703d22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d3471d69825564ffa264d54a5c1ad49b3703d22/compat.py | |
dirwidget = DirectoryListing(self.path) return widgets.RenderSession(dirwidget.display(request), request) | dirListingPage = WidgetPage(DirectoryListing(self.path)) return dirListingPage.render(request) | def render(self, request): "You know what you doing." mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime =\ os.stat(self.path) | b2c4bdcf54e98b6aa3f000b4af0c4492c3da099e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b2c4bdcf54e98b6aa3f000b4af0c4492c3da099e/static.py |
except NameError: | except (NameError, ValueError): | def initThreads(): global theScheduler, thread, schedule import thread # Sibling Imports import main # there may already be a registered scheduler, so we need to get # rid of it. try: main.removeDelayed(theScheduler) except NameError: pass theScheduler = ThreadedScheduler() schedule = theScheduler.addTask main.addDe... | d8307b36fa338ee5169704161d84f92ac19ea6be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d8307b36fa338ee5169704161d84f92ac19ea6be/task.py |
theScheduler = Scheduler() schedule = theScheduler.addTask | def initThreads(): global theScheduler, thread, schedule import thread # Sibling Imports import main # there may already be a registered scheduler, so we need to get # rid of it. try: main.removeDelayed(theScheduler) except NameError: pass theScheduler = ThreadedScheduler() schedule = theScheduler.addTask main.addDe... | d8307b36fa338ee5169704161d84f92ac19ea6be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d8307b36fa338ee5169704161d84f92ac19ea6be/task.py | |
theScheduler = Scheduler() schedule = theScheduler.addTask | def initThreads(): global theScheduler, thread, schedule import thread # Sibling Imports import main # there may already be a registered scheduler, so we need to get # rid of it. try: main.removeDelayed(theScheduler) except NameError: pass theScheduler = ThreadedScheduler() schedule = theScheduler.addTask main.addDe... | d8307b36fa338ee5169704161d84f92ac19ea6be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d8307b36fa338ee5169704161d84f92ac19ea6be/task.py | |
Precondition: descriptorId must be a string of length DESCRIPTORLENGTH.: (type(descriptorId) is types.StringType) and (len(descriptorId) == DESCRIPTORLENGTH): "descriptorId: %s :: %s" % (repr(descriptorId), str(type(descriptorId)),) | def pongReceived(self, descriptorId, ttl, hops, ipAddress, port, numberOfFilesShared, kbShared): """ Override this to handle pong messages. | 3f457aded17ee742e5ed2713631398b191695adb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3f457aded17ee742e5ed2713631398b191695adb/gnutella.py | |
raise error.Unauthorized("Malformed Response - not base64") | raise IllegalClientResponse("Malformed Response - not base64") | def __cbAuthChunk(self, result, chal, tag): try: uncoded = base64.decodestring(result) except binascii.Error: raise error.Unauthorized("Malformed Response - not base64") | 855265c03b66d249c179132ac6c987dfcc91c522 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/855265c03b66d249c179132ac6c987dfcc91c522/imap4.py |
raise error.Unauthorized("Malformed Response - wrong number of parts") | raise IllegalClientResponse("Malformed Response - wrong number of parts") | def __cbAuthChunk(self, result, chal, tag): try: uncoded = base64.decodestring(result) except binascii.Error: raise error.Unauthorized("Malformed Response - not base64") | 855265c03b66d249c179132ac6c987dfcc91c522 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/855265c03b66d249c179132ac6c987dfcc91c522/imap4.py |
self.sendNegativeResponse(tag, 'No such mailbox: ' + parts[1]) | self.sendNegativeResponse(tag, 'No such mailbox: ' + mailbox) | def do_COPY(self, tag, messages, mailbox, uid=0): mailbox = self._parseMbox(mailbox) mbox = self.account.select(mailbox) if not mbox: self.sendNegativeResponse(tag, 'No such mailbox: ' + parts[1]) else: maybeDeferred( self.mbox.fetch, messages, ['BODY', [], 'INTERNALDATE', 'FLAGS'], uid=uid ).addCallbacks( self.__cbCop... | 855265c03b66d249c179132ac6c987dfcc91c522 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/855265c03b66d249c179132ac6c987dfcc91c522/imap4.py |
def collapseStrings(results): """ Turns a list of length-one strings and lists into a list of longer strings and lists. For example, ['a', 'b', ['c', 'd']] is returned as ['ab', ['cd']] @type results: C{list} of C{str} and C{list} @param results: The list to be collapsed @rtype: C{list} of C{str} and C{list} @retur... | 855265c03b66d249c179132ac6c987dfcc91c522 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/855265c03b66d249c179132ac6c987dfcc91c522/imap4.py | ||
if string.find(s,':') != -1: s, trailing = string.split(s, ':', 1) | if string.find(s,' :') != -1: s, trailing = string.split(s, ' :', 1) | def parsemsg(s): """Breaks a message from an IRC server into its prefix, command, and arguments. """ prefix = '' trailing = [] if not s: raise IRCBadMessage("Empty line.") if s[0] == ':': prefix, s = string.split(s[1:], ' ', 1) if string.find(s,':') != -1: s, trailing = string.split(s, ':', 1) args = string.split(s) ar... | f416e23a1d5a1e314809b273f54d98cf174b0b0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f416e23a1d5a1e314809b273f54d98cf174b0b0b/irc.py |
def receivedHeader(self, helo, origin, recipients): """ Generate the Received header for a message @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def receivedHeader(self, helo, origin, recipients): """ Generate the Received header for a message @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def receivedHeader(self, helo, origin, recipients): """ Generate the Received header for a message @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateTo(self, user): """ Validate the address for which the message is destined. @type user: C{User} @param user: The address to validate. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateTo(self, user): """ Validate the address for which the message is destined. @type user: C{User} @param user: The address to validate. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateFrom(self, helo, origin): """ Validate the address from which the message originates. @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateFrom(self, helo, origin): """ Validate the address from which the message originates. @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateFrom(self, helo, origin): """ Validate the address from which the message originates. @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def __str__(self): return "%.3d <%s>... %s" % (self.code, self.addr, self.resp) | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def rfc822date(timeinfo=None,local=1): """ Format an RFC-2822 compliant date string. @param timeinfo: (optional) A sequence as returned by C{time.localtime()} or C{time.gmtime()}. Default is now. @param local: (optional) Indicates if the supplied time is local or universal time, or if no time is given, whether now sho... | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def quoteaddr(addr): """Turn an email address, possibly with realname part etc, into a form suitable for and SMTP envelope. """ if isinstance(addr, Address): return '<%s>' % str(addr) res = rfc822.parseaddr(addr) if res == (None, None): # It didn't parse, use it as-is return '<%s>' % str(addr) else: return '<%s>' % ... | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def quoteaddr(addr): """Turn an email address, possibly with realname part etc, into a form suitable for and SMTP envelope. """ if isinstance(addr, Address): return '<%s>' % str(addr) res = rfc822.parseaddr(addr) if res == (None, None): # It didn't parse, use it as-is return '<%s>' % str(addr) else: return '<%s>' % ... | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def quoteaddr(addr): """Turn an email address, possibly with realname part etc, into a form suitable for and SMTP envelope. """ if isinstance(addr, Address): return '<%s>' % str(addr) res = rfc822.parseaddr(addr) if res == (None, None): # It didn't parse, use it as-is return '<%s>' % str(addr) else: return '<%s>' % ... | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
atl = atl[1:] if not local: | atl = atl[1:] if not local: | def __init__(self, addr, defaultDomain=None): if isinstance(addr, User): addr = addr.dest if isinstance(addr, Address): self.__dict__ = addr.__dict__.copy() return elif not isinstance(addr, types.StringTypes): addr = str(addr) self.addrstr = addr | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py |
domain = [''] | domain = [''] | def __init__(self, addr, defaultDomain=None): if isinstance(addr, User): addr = addr.dest if isinstance(addr, Address): self.__dict__ = addr.__dict__.copy() return elif not isinstance(addr, types.StringTypes): addr = str(addr) self.addrstr = addr | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py |
def __init__(self, addr, defaultDomain=None): if isinstance(addr, User): addr = addr.dest if isinstance(addr, Address): self.__dict__ = addr.__dict__.copy() return elif not isinstance(addr, types.StringTypes): addr = str(addr) self.addrstr = addr | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def __init__(self, addr, defaultDomain=None): if isinstance(addr, User): addr = addr.dest if isinstance(addr, Address): self.__dict__ = addr.__dict__.copy() return elif not isinstance(addr, types.StringTypes): addr = str(addr) self.addrstr = addr | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def __str__(self): return str(self.dest) | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def connectionLost(self): """handle message truncated | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def connectionLost(self): """handle message truncated | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def lineReceived(self, line): self.resetTimeout() return getattr(self, 'state_' + self.mode)(line) | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def lookupMethod(self, command): return getattr(self, 'do_' + command.upper(), None) | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def do_DATA(self, rest): if self._from is None or (not self._to): self.sendCode(503, 'Must have valid receiver and originator') return assert self.delivery self.mode = DATA helo, origin = self._helo, self._from recipients = self._to self._from = None self._to = [] self.datafailed = None try: self.__messages = [f() fo... | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def do_DATA(self, rest): if self._from is None or (not self._to): self.sendCode(503, 'Must have valid receiver and originator') return assert self.delivery self.mode = DATA helo, origin = self._helo, self._from recipients = self._to self._from = None self._to = [] self.datafailed = None try: self.__messages = [f() fo... | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def _cbAuthenticated(self, (iface, avatar, logout)): assert iface is IMessageDelivery, "IMessageDelivery is the only supported interface" self.delivery = avatar self._onLogout = logout self.authenticated = 1 self.challenger = None | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateFrom(self, helo, origin): """ Validate the address from which the message originates. @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateFrom(self, helo, origin): """ Validate the address from which the message originates. @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateFrom(self, helo, origin): """ Validate the address from which the message originates. @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateFrom(self, helo, origin): """ Validate the address from which the message originates. @type helo: C{(str, str)} @param helo: The argument to the HELO command and the client's IP address. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py | ||
def validateTo(self, user): """ Validate the address for which the message is destined. @type user: C{User} @param user: The address to validate. | 79540cb9964d08bd45323d59684ba9411ea04f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79540cb9964d08bd45323d59684ba9411ea04f35/smtp.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.