rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
def resumeProducing(self): if (self.request is None) or (self.file.closed): return self.request.write(self.file.read(abstract.FileDescriptor.bufferSize)) | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py | ||
print "disconcert and die" | def loseConnection(self): "Disconnect, and clean up" print "disconcert and die" if self.file is not None: if self.file.tell() == self.filesize: self.pi.reply('getok') else: self.pi.reply('getabort') self.file.close() self.file = None self.pi.queuedfile = None # just incase self.transport.loseConnection() | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py | |
self.pi.reply('getabort') | self.pi.reply('getok') | def loseConnection(self): "Disconnect, and clean up" print "disconcert and die" if self.file is not None: if self.file.tell() == self.filesize: self.pi.reply('getok') else: self.pi.reply('getabort') self.file.close() self.file = None self.pi.queuedfile = None # just incase self.transport.loseConnection() | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
print "makeTransport" | def makeTransport(self): print "makeTransport" transport = self.transport transport.finish = self.finish return transport | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py | |
print "connectionMade" | def connectionMade(self): "Will start an transfer, if one is queued up, when the client connects" print "connectionMade" if self.pi.action is not None: self.executeAction() | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py | |
print "executeaction" | def executeAction(self): """Initiates the transfer. This is a two-case implementation for starting the transfer. It is either started by the telnet-interface when the connection is already open, or it is called by connectionMade. The property 'pi' is the telnetconnection and its property 'action' can either be 'GET', '... | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py | |
sendFileTransfer(self.file, self.filesize, self.makeTransport()) | dtp = sendFileTransfer(self.file, self.filesize, self.makeTransport()) dtp.resumeProducing() | def fileget(self, queuedfile): "Send the given file to the peer" self.file = open(queuedfile, "rb") self.filesize = os.path.getsize(queuedfile) sendFileTransfer(self.file, self.filesize, self.makeTransport()) | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
mtime = time.strftime("%b %2d %2H:%2M", time.gmtime(os.path.getmtime(ff))) | mtime = time.strftime("%b %d %H:%M", time.gmtime(os.path.getmtime(ff))) | def listdir(self, dir): """Prints outs the files in the given directory Note that the printout is very fake, and only gives the filesize, date, time and filename. """ list = os.listdir(dir) for a in list: s = a ff = os.path.join(dir, s) # the full filename mtime = time.strftime("%b %2d %2H:%2M", time.gmtime(os.path.get... | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
class FTP(protocol.Protocol): | class FTP(protocol.Protocol, protocol.Factory): """The FTP-Protocol. Also a factory for the DTP.""" | def listdir(self, dir): """Prints outs the files in the given directory Note that the printout is very fake, and only gives the filesize, date, time and filename. """ list = os.listdir(dir) for a in list: s = a ff = os.path.join(dir, s) # the full filename mtime = time.strftime("%b %2d %2H:%2M", time.gmtime(os.path.get... | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
print key | def reply(self, key, s = ''): print key if ftp_reply[key].find('%s') > -1: self.transport.write(ftp_reply[key] % s + '\r\n') else: self.transport.write(ftp_reply[key] + '\r\n') | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py | |
if not os.path.isdir(self.root + wd): | if (not os.path.isdir(self.root + wd)) or (wd.find('..') > 0) or (wd.find('\\') > 0) or (wd.find('//') > 0): | def ftp_Cwd(self, params): if self.checkauth(): return wd = os.path.normpath(params) if not os.path.isabs(wd): wd = os.path.normpath(self.wd + '/' + wd) if not os.path.isdir(self.root + wd): self.reply('nodir', params) return else: self.wd = wd self.reply('cwdok') | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
self.dtp.transport.loseConnection() | self.dtp.loseConnection() | def createPassiveServer(self): # a bit silly code if self.dtp is not None: if self.dtp.transport is not None: self.dtp.transport.loseConnection() self.dtp = None # giving 0 will generate a free port self.dtpPort = tcp.Port(0, self) self.dtpPort.startListening() | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
self.dtp.transport.loseConnection() | self.dtp.loseConnection() | def createActiveServer(self): # silly code repeating if self.dtp is not None: if self.dtp.transport is not None: self.dtp.transport.loseConnection() self.dtp = None self.dtpPort = tcp.Client(self.peerhost, self.peerport, self.buildProtocol(self.peerport)) self.dtp.transport = self.dtpPort | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
self.dtpPort = tcp.Client(self.peerhost, self.peerport, self.buildProtocol(self.peerport)) | self.dtp = self.buildProtocol(self.peerport) self.dtpPort = tcp.Client(self.peerhost, self.peerport, self.dtp) | def createActiveServer(self): # silly code repeating if self.dtp is not None: if self.dtp.transport is not None: self.dtp.transport.loseConnection() self.dtp = None self.dtpPort = tcp.Client(self.peerhost, self.peerport, self.buildProtocol(self.peerport)) self.dtp.transport = self.dtpPort | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
def buildProtocol(self, addr): self.dtp = DTP() | def createActiveServer(self): # silly code repeating if self.dtp is not None: if self.dtp.transport is not None: self.dtp.transport.loseConnection() self.dtp = None self.dtpPort = tcp.Client(self.peerhost, self.peerport, self.buildProtocol(self.peerport)) self.dtp.transport = self.dtpPort | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py | |
self.dtp.factory = self return self.dtp | def buildProtocol(self,addr): p = DTP() p.factory = self p.pi = self p.transport = self.dtpPort if self.dtpPort: p.DTPLoseConnection = self.dtpPort.loseConnection self.dtp = p return p | def buildProtocol(self, addr): self.dtp = DTP() self.dtp.pi = self self.dtp.factory = self return self.dtp | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
if self.peerport < 1024: | if peerport < 1024: | def ftp_Port(self, params): """Request for an active connection This command may be potentially abused, and the only countermeasure so far is that no port below 1024 may be targeted. An extra approach is to disable port'ing to a third-party ip, which is optional through ALLOW_THIRDPARTY. Note that this disables 'Cross-... | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py |
print self.dtp, "is the DTP" print self.dtp.transport, "is the Transport" | def ftp_List(self, params): if self.checkauth(): return # The reason for this long join, is to exclude access below the root npath = self.buildFullpath(params) if not os.path.isdir(npath): self.reply('nodir', params) return self.reply('get') self.queuedfile = npath self.action = 'LIST' print self.dtp, "is the DTP" prin... | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py | |
print line | def processLine(self, line): "Process the input from the client" line = line.strip() print line command = line.split() if command == []: self.reply('unknown') return 0 commandTmp, command = command[0], '' for c in commandTmp: if ord(c) < 128: command = command + c command = command.capitalize() print "-"+command+"-" if... | 07377cad2b39b3e3d459447a924d1bc82ce72f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07377cad2b39b3e3d459447a924d1bc82ce72f33/ftp.py | |
self.xml.get_widget("NickLabel").set_text(self.group.account.client.name) | self.xml.get_widget("NickLabel").set_text( getattr(self.group.account.client,"name","(no name)")) | def __init__(self, group): InputOutputWindow.__init__(self, "GroupChatBox", "GroupInput", "GroupOutput") self.group = group self.members = [] self.membersHidden = 0 self._colorcache = {} alloc_color = self.output.get_colormap().alloc self.myColor = alloc_color("#0000ff") self.xml.get_widget("NickLabel").set_text(self.g... | ff1679862bd51286d0d5797ba0961358c2d365d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/ff1679862bd51286d0d5797ba0961358c2d365d3/gtkchat.py |
return davxml.GETContentType.fromString(self.resource.contentType()) | mimeType = self.resource.contentType() mimeType.params = None return davxml.GETContentType.fromString(generateContentType(mimeType)) | def __getitem__(self, key): namespace, name = key | 4378e1eed42e2f3a77e1b3dd102614189deedbed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4378e1eed42e2f3a77e1b3dd102614189deedbed/props.py |
self.skt.close() self.protocol.connectionLost() | if not self.disconnected: self.skt.close() self.protocol.connectionLost() abstract.FileDescriptor.connectionLost(self) | def connectionLost(self, arg=None): # print 'closing the connection' self.skt.close() self.protocol.connectionLost() | e86e5cb2e804313219d4b3dc4cac873802b19914 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e86e5cb2e804313219d4b3dc4cac873802b19914/jnternet.py |
class Blocker: | class Blocker(threading.Thread): | def loseConnection(self): self.writeQ.put(None) | e86e5cb2e804313219d4b3dc4cac873802b19914 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e86e5cb2e804313219d4b3dc4cac873802b19914/jnternet.py |
def start(self): threading.Thread(target=self.blockForever).start() | def run(self): self.blockForever() | def start(self): threading.Thread(target=self.blockForever).start() | e86e5cb2e804313219d4b3dc4cac873802b19914 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e86e5cb2e804313219d4b3dc4cac873802b19914/jnternet.py |
l = self.fdes.istream.read(bytes) | try: l = self.fdes.istream.read(bytes) except SocketException: self.stop() return (self.fdes.connectionLost, 0) | def block(self): bytes = jarray.zeros(8192, 'b') l = self.fdes.istream.read(bytes) if l == -1: self.stop() return (self.fdes.connectionLost,0) return (self.fdes.protocol.dataReceived, bytes[:l].tostring()) | e86e5cb2e804313219d4b3dc4cac873802b19914 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e86e5cb2e804313219d4b3dc4cac873802b19914/jnternet.py |
return (self.fdes.connectionLost,0) | return (self.fdes.connectionLost, 0) | def block(self): bytes = jarray.zeros(8192, 'b') l = self.fdes.istream.read(bytes) if l == -1: self.stop() return (self.fdes.connectionLost,0) return (self.fdes.protocol.dataReceived, bytes[:l].tostring()) | e86e5cb2e804313219d4b3dc4cac873802b19914 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e86e5cb2e804313219d4b3dc4cac873802b19914/jnternet.py |
protocol.makeConnection(transport, tcpPort) | def portGotSocket(tcpPort, skt): # make this into an address... protocol = tcpPort.factory.buildProtocol(None) transport = JConnection(skt, protocol) # make read and write blockers wb = WriteBlocker(transport, theMultiplexor.q) wb.start() transport.writeBlocker = wb ReadBlocker(transport, theMultiplexor.q).start() pro... | e86e5cb2e804313219d4b3dc4cac873802b19914 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e86e5cb2e804313219d4b3dc4cac873802b19914/jnternet.py | |
def _setUpDebugging(config, suite): suite.reporter.debugger = 1 | def _getDebugger(): | def _setUpDebugging(config, suite): suite.reporter.debugger = 1 dbg = pdb.Pdb() try: rcFile = open("../.pdbrc") except IOError: hasattr(sys, 'exc_clear') and sys.exc_clear() else: dbg.rcLines.extend(rcFile.readlines()) if config['until-failure']: call_until_failure(suite.reporter, dbg.run, "suite.run(config['random'])"... | 5584962440ea64de685830c76e42f7a16ae3c06b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5584962440ea64de685830c76e42f7a16ae3c06b/trial.py |
if config['until-failure']: call_until_failure(suite.reporter, dbg.run, "suite.run(config['random'])", globals(), locals()) else: dbg.run("suite.run(config['random'])", globals(), locals()) | return dbg def _setUpDebugging(config, suite): suite.reporter.debugger = 1 _getDebugger().run("suite.run(config['random'])", globals(), locals()) | def _setUpDebugging(config, suite): suite.reporter.debugger = 1 dbg = pdb.Pdb() try: rcFile = open("../.pdbrc") except IOError: hasattr(sys, 'exc_clear') and sys.exc_clear() else: dbg.rcLines.extend(rcFile.readlines()) if config['until-failure']: call_until_failure(suite.reporter, dbg.run, "suite.run(config['random'])"... | 5584962440ea64de685830c76e42f7a16ae3c06b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5584962440ea64de685830c76e42f7a16ae3c06b/trial.py |
def call_until_failure(suite, callable, *args, **kwargs): | def call_until_failure(f, *args, **kwargs): | def _doProfilingRun(config, suite): if config['until-failure']: raise RuntimeError, \ "you cannot use both --until-failure and --profile" import profile prof = profile.Profile() try: prof.runcall(suite.run, config['random']) prof.dump_stats('profile.data') except SystemExit: pass prof.print_stats() | 5584962440ea64de685830c76e42f7a16ae3c06b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5584962440ea64de685830c76e42f7a16ae3c06b/trial.py |
callable(*args, **kwargs) | suite = f(*args, **kwargs) | def call_until_failure(suite, callable, *args, **kwargs): count = 1 print "Test Pass %d" % count callable(*args, **kwargs) while itrial.ITestStats(suite).allPassed: count += 1 print "Test Pass %d" % count callable(*args, **kwargs) | 5584962440ea64de685830c76e42f7a16ae3c06b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5584962440ea64de685830c76e42f7a16ae3c06b/trial.py |
callable(*args, **kwargs) def reallyRun(config, suite): | suite = f(*args, **kwargs) return suite def reallyRun(config): if config['until-failure']: if not config['debug']: def _doRun(config): suite = _getSuite(config) suite.run(config['random']) return suite return call_until_failure(_doRun, config) else: def _doRun(config): suite = _getSuite(config) _getDebugger().run("su... | def call_until_failure(suite, callable, *args, **kwargs): count = 1 print "Test Pass %d" % count callable(*args, **kwargs) while itrial.ITestStats(suite).allPassed: count += 1 print "Test Pass %d" % count callable(*args, **kwargs) | 5584962440ea64de685830c76e42f7a16ae3c06b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5584962440ea64de685830c76e42f7a16ae3c06b/trial.py |
if config['until-failure']: call_until_failure(suite, suite.run, config['random']) else: suite.run(config['random']) | suite.run(config['random']) | def reallyRun(config, suite): if config['debug']: _setUpDebugging(config, suite) elif config['profile']: _doProfilingRun(config, suite) else: if config['until-failure']: call_until_failure(suite, suite.run, config['random']) else: suite.run(config['random']) return suite | 5584962440ea64de685830c76e42f7a16ae3c06b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5584962440ea64de685830c76e42f7a16ae3c06b/trial.py |
suite = _getSuite(config) | def run(): _monkeyPatchPyunit() if len(sys.argv) == 1: sys.argv.append("--help") config = Options() try: config.parseOptions() except usage.error, ue: raise SystemExit, "%s: %s" % (sys.argv[0], ue) _setUpAdapters() _initialDebugSetup(config) suite = _getSuite(config) _setUpTestdir() _setUpLogging(config) reallyRu... | 5584962440ea64de685830c76e42f7a16ae3c06b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5584962440ea64de685830c76e42f7a16ae3c06b/trial.py | |
reallyRun(config, suite) | suite = reallyRun(config) | def run(): _monkeyPatchPyunit() if len(sys.argv) == 1: sys.argv.append("--help") config = Options() try: config.parseOptions() except usage.error, ue: raise SystemExit, "%s: %s" % (sys.argv[0], ue) _setUpAdapters() _initialDebugSetup(config) suite = _getSuite(config) _setUpTestdir() _setUpLogging(config) reallyRu... | 5584962440ea64de685830c76e42f7a16ae3c06b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5584962440ea64de685830c76e42f7a16ae3c06b/trial.py |
* stubs: a set of definitions of classes to construct, of the form [ (StubClass, args, databaseTableName, KeyColumns) ] | * stubs: a set of definitions of classes to construct, of the form [ (StubClass, databaseTableName, KeyColumns) ] | def __init__(self, dbpool, stubs, populatedCallback): """ Initialize me against a database. | e400a57f7ef62591eb86381a984cf6ee4e2b47d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e400a57f7ef62591eb86381a984cf6ee4e2b47d1/row.py |
versionNum = '$Revision: 1.28 $'[11:-2] | versionNum = '$Revision: 1.29 $'[11:-2] | def receiveDirectMessage(self, sender, message, metadata=None): """Pass this message through tendril to my IRC counterpart. """ self.tendril.msgFromWords(self.nickname, sender, message, metadata) | 2275df7f56a4bcbefbaf656c4502ff1e2aa2e878 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2275df7f56a4bcbefbaf656c4502ff1e2aa2e878/tendril.py |
__implements__ = IWordsClient | implements(IWordsClient) | def memberLeft(self, member, group): """Tells me a member has left a group. """ | a9281674c28b7940aacf411bab7d65931292a7bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a9281674c28b7940aacf411bab7d65931292a7bd/service.py |
__implements__ = IWordsPolicy | implements(IWordsPolicy) | def lookUpParticipant(self, nick): """ Get a Participant, given a name.""" | a9281674c28b7940aacf411bab7d65931292a7bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a9281674c28b7940aacf411bab7d65931292a7bd/service.py |
NO_BODY_CODES = (204, 304, 302, 303) | NO_BODY_CODES = (204, 304) | def rawDataReceived(self, data): if self.length is not None: data, rest = data[:self.length], data[self.length:] self.length -= len(data) else: rest = '' self.handleResponsePart(data) if self.length == 0: self.handleResponseEnd() self.setLineMode(rest) | 3d0df19859b4230b91a50d234d8e0ec6bf50e233 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3d0df19859b4230b91a50d234d8e0ec6bf50e233/http.py |
if self.chunked and self.code not in NO_BODY_CODES: | if not self.startedWriting: self.write('') if self.chunked and self.code in NO_BODY_CODES: raise RuntimeError, "we screwed up" if self.chunked: | def finish(self): """We are finished writing data.""" if not hasattr(self, 'channel'): warnings.warn("Warning! request.finish called twice.", stacklevel=2) return if self.chunked and self.code not in NO_BODY_CODES: # write last chunk and closing CRLF self.transport.write("0\r\n\r\n") elif not self.startedWriting: # wri... | 3d0df19859b4230b91a50d234d8e0ec6bf50e233 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3d0df19859b4230b91a50d234d8e0ec6bf50e233/http.py |
elif not self.startedWriting: self.write('') | def finish(self): """We are finished writing data.""" if not hasattr(self, 'channel'): warnings.warn("Warning! request.finish called twice.", stacklevel=2) return if self.chunked and self.code not in NO_BODY_CODES: # write last chunk and closing CRLF self.transport.write("0\r\n\r\n") elif not self.startedWriting: # wri... | 3d0df19859b4230b91a50d234d8e0ec6bf50e233 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3d0df19859b4230b91a50d234d8e0ec6bf50e233/http.py | |
self.setHeader("content-length", "0") | def redirect(self, url): """Utility function that does a redirect. | 3d0df19859b4230b91a50d234d8e0ec6bf50e233 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3d0df19859b4230b91a50d234d8e0ec6bf50e233/http.py | |
portal = self.service.defaultPortal() return portal.login( cred.credentials.UsernamePassword(user, password), None, pop3.IMailbox ) | user, domain = self.lookupDomain(user) try: portal = self.service.lookupPortal(domain) except KeyError: return defer.fail(cred.error.UnauthorizedLogin()) else: return portal.login( cred.credentials.UsernamePassword(user, password), None, pop3.IMailbox ) | def authenticateUserPASS(self, user, password): portal = self.service.defaultPortal() return portal.login( cred.credentials.UsernamePassword(user, password), None, pop3.IMailbox ) | 7d3f95d3a6b4f7ad0fee4dbe6b2bfc118d8cf04a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7d3f95d3a6b4f7ad0fee4dbe6b2bfc118d8cf04a/protocols.py |
print 'do a transfer' | def transfer(self): if self.transferring: return self.transfering = True | 479d3890710a908fb7dacf827bf4f891d154ad88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/479d3890710a908fb7dacf827bf4f891d154ad88/secondary.py | |
print 'gawt', zone | def _cbZone(self, zone): ans, _, _ = zone print 'gawt', zone self.records = r = {} for rec in ans: if rec.type == dns.SOA: self.soa = (str(rec.name).lower(), rec.payload) else: r.setdefault(str(rec.name).lower(), []).append(rec.payload) | 479d3890710a908fb7dacf827bf4f891d154ad88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/479d3890710a908fb7dacf827bf4f891d154ad88/secondary.py | |
print 'uperdate' | def update(self): print 'uperdate' self.transfer().addCallbacks(self._cbTransferred, self._ebTransferred) | 479d3890710a908fb7dacf827bf4f891d154ad88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/479d3890710a908fb7dacf827bf4f891d154ad88/secondary.py | |
print 'done xferred' | def _cbTransferred(self, result): print 'done xferred' self.transferring = False | 479d3890710a908fb7dacf827bf4f891d154ad88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/479d3890710a908fb7dacf827bf4f891d154ad88/secondary.py | |
def getObjectRetreiver(): | def getObjectRetriever(): | def getObjectRetreiver(): """Get a factory which retreives a root object from its client @returns: A pair: A ClientFactory and a Deferred which will be passed a remote reference to the root object of a PB server.x """ d = defer.Deferred() b = Broker(1) bf = BrokerClientFactory(b) _ObjectRetrieval(b, d) return bf, d | dd545421a2f28d41032ba27dbb4ee2df82bedbf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/dd545421a2f28d41032ba27dbb4ee2df82bedbf7/pb.py |
bf, d = getObjectRetreiver() | bf, d = getObjectRetriever() | def getObjectAt(host, port, timeout=None): """Establishes a PB connection and returns with a L{RemoteReference}. @param host: the host to connect to @param port: the port number to connect to @param timeout: a value in milliseconds to wait before failing by default. (OPTIONAL) @returns: A Deferred which will be pas... | dd545421a2f28d41032ba27dbb4ee2df82bedbf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/dd545421a2f28d41032ba27dbb4ee2df82bedbf7/pb.py |
bf, d = getObjectRetreiver() | bf, d = getObjectRetriever() | def getObjectAtSSL(host, port, timeout=None): """Establishes a PB connection over SSL and returns with a RemoteReference. @param host: the host to connect to @param port: the port number to connect to @param timeout: a value in milliseconds to wait before failing by default. (OPTIONAL) @returns: A Deferred which w... | dd545421a2f28d41032ba27dbb4ee2df82bedbf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/dd545421a2f28d41032ba27dbb4ee2df82bedbf7/pb.py |
if node.getAttribute("class", "").find('listing') == -1: | if node.getAttribute("class", "").find('listing') != -1: | def fixLinks(document, ext): supported_schemes=['http', 'https', 'ftp', 'mailto'] for node in domhelpers.findElementsWithAttribute(document, 'href'): href = node.getAttribute("href") if urlparse.urlparse(href)[0] in supported_schemes: continue if node.getAttribute("class", "") == "absolute": continue if node.getAttrib... | 873a91510e85d9e0724ac5391adf1c6bd8f12790 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/873a91510e85d9e0724ac5391adf1c6bd8f12790/tree.py |
controllerResult, request, node, controller, view, success): | controllerResult, request, node, controller, view): | def handleControllerResults(self, controllerResult, request, node, controller, view, success): """Handle a deferred from a controller. """ self.outstandingCallbacks -= 1 if controllerResult is not None: self.outstandingCallbacks += 1 controllerResult.addCallback( self.handleControllerResults, request, node, controller,... | 483454b1e5e7a0a179f6f9746f8324b4d33b9efa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/483454b1e5e7a0a179f6f9746f8324b4d33b9efa/view.py |
if controllerResult is not None: | if isinstance(controllerResult, defer.Deferred): | def handleControllerResults(self, controllerResult, request, node, controller, view, success): """Handle a deferred from a controller. """ self.outstandingCallbacks -= 1 if controllerResult is not None: self.outstandingCallbacks += 1 controllerResult.addCallback( self.handleControllerResults, request, node, controller,... | 483454b1e5e7a0a179f6f9746f8324b4d33b9efa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/483454b1e5e7a0a179f6f9746f8324b4d33b9efa/view.py |
returnNode = self.dispatchResult(request, node, view) | viewResult = view.generate(request, node) returnNode = self.dispatchResult(request, node, viewResult) | def handleControllerResults(self, controllerResult, request, node, controller, view, success): """Handle a deferred from a controller. """ self.outstandingCallbacks -= 1 if controllerResult is not None: self.outstandingCallbacks += 1 controllerResult.addCallback( self.handleControllerResults, request, node, controller,... | 483454b1e5e7a0a179f6f9746f8324b4d33b9efa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/483454b1e5e7a0a179f6f9746f8324b4d33b9efa/view.py |
self.producerPaused = 0 | def doWrite(self): """Called when data is available for writing. | 54d4ea4ca06ffc9f1c773003f36a9c261e900ee2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/54d4ea4ca06ffc9f1c773003f36a9c261e900ee2/abstract.py | |
You can call connector.stopConnecting() to stop the connection attempt. | def startedConnecting(self, connector): """Called when a connection has been started. | c503658558d29642b85df33783801929be286e40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c503658558d29642b85df33783801929be286e40/protocol.py | |
def testSuperfluousDisableRequestRaise(self): | def testSuperfluousDisableRequestRaises(self): | def testSuperfluousDisableRequestRaise(self): # Try to disable a disabled option. Make sure it fails properly. d = self.p.requestDisable('\xab') self.assertRaises(telnet.AlreadyDisabled, util.wait, d) | 7e93ddc591198328286b54f151c2d4063e46bbd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7e93ddc591198328286b54f151c2d4063e46bbd6/test_telnet.py |
testdir = "_trial_temp" if os.path.exists(testdir): import shutil shutil.rmtree(testdir) os.mkdir(testdir) os.chdir(testdir) | def run(): if len(sys.argv) == 1: sys.argv.append("--help") config = Options() try: config.parseOptions() except usage.error, ue: print "%s: %s" % (sys.argv[0], ue) os._exit(1) if config['reactor']: from twisted.python import reflect mod = 'twisted.internet.' + config['reactor'] print "Using %s reactor" % mod reflect... | c2f7ee8afe6c0634d30148f0c59176e6b5cde290 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c2f7ee8afe6c0634d30148f0c59176e6b5cde290/trial.py | |
return UnauthorizedLogin() | return failure.Failure(UnauthorizedLogin()) | def _ebRequestAvatarId(self, f): if not f.check(UnauthorizedLogin, error.ValidPublicKey): log.msg(f) return UnauthorizedLogin() return f | 8a8c46ed016a99ea8ab07e27588355cb81a117eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8a8c46ed016a99ea8ab07e27588355cb81a117eb/checkers.py |
elif fine("PASS"): | elif find("PASS"): | def lineReceived(self, line): """Error Conditions""" uline = line.upper() find = lambda s: uline.find(s) != -1 | 39e728aaf1bac3da695312e6034825bae5f913a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/39e728aaf1bac3da695312e6034825bae5f913a0/pop3testserver.py |
return self.append(FlowMerge(self.addMerge(bucket=bucket))) | return self.append(FlowMerge(bucket=bucket)) | def addMergeToList(self, bucket=None): return self.append(FlowMerge(self.addMerge(bucket=bucket))) | de18f32a9b8f70faab51a8b069912c20d375f284 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/de18f32a9b8f70faab51a8b069912c20d375f284/flow.py |
for link, bucket in self._flush: data = self.get(bucket, None) flow.push(data, link.stage, link.next) flow.context = self._parent | if not(self._flush): flow.context = self._parent return (link, bucket) = self._flush.pop(0) data = self.get(bucket, None) flow.push(cntx, self.onFlush) flow.push(data, link.stage, link.next) | def onFlush(self, flow, cntx): ''' cleans up the context and fires onFlush events ''' assert flow.context is self assert flow.context is cntx for link, bucket in self._flush: data = self.get(bucket, None) flow.push(data, link.stage, link.next) flow.context = self._parent | de18f32a9b8f70faab51a8b069912c20d375f284 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/de18f32a9b8f70faab51a8b069912c20d375f284/flow.py |
def __init__(self, func = list.append, start = lambda: [], bucket = None, reduce = 0): | def __init__(self, func = lambda lst, val: lst.append(val) or lst, start = lambda: [], bucket = None, reduce = 1): | def __init__(self, func = list.append, start = lambda: [], bucket = None, reduce = 0): if not bucket: bucket = id(self) self.bucket = str(bucket) self.start = start self.func = func self.reduce = reduce | de18f32a9b8f70faab51a8b069912c20d375f284 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/de18f32a9b8f70faab51a8b069912c20d375f284/flow.py |
if not self.bucket in cntx: | if not cntx.has_key(self.bucket): | def __call__(self, flow, data): cntx = flow.context if not self.bucket in cntx: start = self.start if callable(start): start = start() cntx[self.bucket] = start cntx.addFlush(flow.nextLinkItem(), self.bucket) curr = self.func(cntx[self.bucket], data) if self.reduce: cntx[self.bucket] = curr else: if curr: cntx[self.buc... | de18f32a9b8f70faab51a8b069912c20d375f284 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/de18f32a9b8f70faab51a8b069912c20d375f284/flow.py |
cntx[self.bucket] = curr[0] flow.push(curr[1]) | (save, data) = curr cntx[self.bucket] = save if data: flow.push(data) | def __call__(self, flow, data): cntx = flow.context if not self.bucket in cntx: start = self.start if callable(start): start = start() cntx[self.bucket] = start cntx.addFlush(flow.nextLinkItem(), self.bucket) curr = self.func(cntx[self.bucket], data) if self.reduce: cntx[self.bucket] = curr else: if curr: cntx[self.buc... | de18f32a9b8f70faab51a8b069912c20d375f284 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/de18f32a9b8f70faab51a8b069912c20d375f284/flow.py |
def pickColor(self, value, mode, BOLD = map(str.upper, ColorText.COLORS)): | def pickColor(self, value, mode, BOLD = ColorText.BOLD_COLORS): | def pickColor(self, value, mode, BOLD = map(str.upper, ColorText.COLORS)): if mode: return ColorText.COLORS[value] else: return self.bold and BOLD[value] or ColorText.COLORS[value] | 97df0289c460c598f6062043ac918817e352b244 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/97df0289c460c598f6062043ac918817e352b244/ansi.py |
node.appendChild(document.createTextNode(str(self.getData()))) | textNode = document.createTextNode(str(self.getData())) if node is None: return textNode node.appendChild(textNode) | def generateDOM(self, request, node): if isinstance(self.text, Model): node.appendChild(document.createTextNode(str(self.getData()))) return node else: return document.createTextNode(self.text) | a7506e8a9ef04349b84a341e174f3a9b38592e19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a7506e8a9ef04349b84a341e174f3a9b38592e19/domwidgets.py |
footnotes(document) notes(document) | def munge(document, template, linkrel, d, fullpath, ext, url): fixRelativeLinks(template, linkrel) addMtime(template, fullpath) removeH1(document) expandAPI(document) fixAPI(document, url) fontifyPython(document) addPyListings(document, d) addHTMLListings(document, d) fixLinks(document, ext) putInToC(template, generate... | 59579e941c1cd231f9fc1e196c2abd192b880f99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/59579e941c1cd231f9fc1e196c2abd192b880f99/tree.py | |
data = escapingRE.sub(r'\\\1{}', data).replace('\\', '$\backslash$') | data = escapingRE.sub(r'\\\1{}', data.replace('\\', '$\\backslash$')) | def gotText(self, data): if self.ignoring: return if self.normalizing: data = data.replace('\n', ' ') if self.escaping: data = escapingRE.sub(r'\\\1{}', data).replace('\\', '$\backslash$') self.writer(data) | 188f7dfa61ba793347681bddd21fecfc38e91672 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/188f7dfa61ba793347681bddd21fecfc38e91672/latex.py |
self._runCallbacks() | if self.called: self._runCallbacks() | def unpause(self): """Process all callbacks made since pause() was called. """ self.paused = 0 self._runCallbacks() | aaee4b55e1c441fef85fbddd5ea5902d5c8c66ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/aaee4b55e1c441fef85fbddd5ea5902d5c8c66ee/defer.py |
oldstdin.close() oldstdout.close() oldstderr.close() | for i in range(3): try: os.close(i) except OSError, e: import errno if e.errno != errno.EBADF: raise | def rotateLog(signal, frame, logFile=logFile): logFile.rotate() | c43df0d2e976b125e0d18b1ac90ad4a1d96c39c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c43df0d2e976b125e0d18b1ac90ad4a1d96c39c0/twistd.py |
escape('(--%s)-%s[%s]' % (long, short, descr)) | out_file.write(escape('(--%s)-%s[%s]' % (long, short, descr))) out_file.write(' \\\n') | out_file.write('#compdef %s\n' % cmd_name) | 79c9bf594f3cc1a08d104dfdc8171d13ae51228e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79c9bf594f3cc1a08d104dfdc8171d13ae51228e/zshcomp.py |
out_file.write(escape('%s-%s[%s]' % (longExclusion, long, descr))) | out_file.write(escape('%s--%s[%s]' % (longExclusion, long, descr))) | out_file.write('#compdef %s\n' % cmd_name) | 79c9bf594f3cc1a08d104dfdc8171d13ae51228e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/79c9bf594f3cc1a08d104dfdc8171d13ae51228e/zshcomp.py |
pickleStringO, unpickleStringO) | pickleStringO, unpickleStringO) | def unpickleStringO(val, sek): x = StringIO.StringIO() x.write(val) x.seek(sek) return x | 07dbb099b71667733285b657d49680f50ad7d7dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07dbb099b71667733285b657d49680f50ad7d7dd/styles.py |
log.msg( "WARNING: serializing ephemeral %s" % self ) | log.msg( "WARNING: serializing ephemeral %s" % self.__class__ ) | def __getstate__(self): log.msg( "WARNING: serializing ephemeral %s" % self ) return None | 07dbb099b71667733285b657d49680f50ad7d7dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07dbb099b71667733285b657d49680f50ad7d7dd/styles.py |
self.file.close() self.file = None | if self.file is not None: self.file.close() self.file = None | def connectionLost(self, reason): if (self.action == 'STOR') and (self.file): self.pi.reply('fileok') elif self.file is not None: if self.file.tell() == self.filesize: self.pi.reply('fileok') else: self.pi.reply('getabort') self.file.close() self.file = None self.pi.queuedfile = None self.action = None if hasattr(self.... | f573791dbfca5f9f50a998647c1033ce1914774f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f573791dbfca5f9f50a998647c1033ce1914774f/ftp.py |
mtime = time.strftime("%b %d %H:%M", time.gmtime(os.path.getmtime(ff))) fsize = os.path.getsize(ff) | try: mtn = os.path.getmtime(ff) fsize = os.path.getsize(ff) except OSError: mtn = 0 fsize = 0 mtime = time.strftime("%b %d %H:%M", time.gmtime(mtn)) | def actionLIST(self, dir): """Prints outs the files in the given directory Note that the printout is very fake, and only gives the filesize, date, time and filename. """ list = os.listdir(dir) s = '' for a in list: ts = a ff = os.path.join(dir, ts) # the full filename mtime = time.strftime("%b %d %H:%M", time.gmtime(os... | f573791dbfca5f9f50a998647c1033ce1914774f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f573791dbfca5f9f50a998647c1033ce1914774f/ftp.py |
s = s + diracc+"r-xr-xr-x 1 twisted twisted %11d" % fsize+' '+mtime+' '+ts+'\n' | s = s + diracc+"r-xr-xr-x 1 twisted twisted %11d" % fsize+' '+mtime+' '+ts+'\r\n' | def actionLIST(self, dir): """Prints outs the files in the given directory Note that the printout is very fake, and only gives the filesize, date, time and filename. """ list = os.listdir(dir) s = '' for a in list: ts = a ff = os.path.join(dir, ts) # the full filename mtime = time.strftime("%b %d %H:%M", time.gmtime(os... | f573791dbfca5f9f50a998647c1033ce1914774f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f573791dbfca5f9f50a998647c1033ce1914774f/ftp.py |
from twisted.internet.reactor import callInThread | def __init__(self, data = None): from twisted.internet.reactor import callInThread self.data = data tunnel = _TunnelIterator(self) self._tunnel = tunnel callInThread(tunnel.process) | faed9f4d687c0d398ba7ecd3282cb38e37f5b3a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/faed9f4d687c0d398ba7ecd3282cb38e37f5b3a9/flow.py | |
callInThread(tunnel.process) | def __init__(self, data = None): from twisted.internet.reactor import callInThread self.data = data tunnel = _TunnelIterator(self) self._tunnel = tunnel callInThread(tunnel.process) | faed9f4d687c0d398ba7ecd3282cb38e37f5b3a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/faed9f4d687c0d398ba7ecd3282cb38e37f5b3a9/flow.py | |
ThreadedIterator.__init__(self) | def __init__(self, pool, sql, fetchall=0): self.curs = None self.sql = sql self.pool = pool self.data = None self.fetchall = fetchall ThreadedIterator.__init__(self) | faed9f4d687c0d398ba7ecd3282cb38e37f5b3a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/faed9f4d687c0d398ba7ecd3282cb38e37f5b3a9/flow.py | |
def pongReceived(self, descriptorId, ttl, hops, ipAddress, port, numberOfFilesShared, kbShared) | def pongReceived(self, descriptorId, ttl, hops, ipAddress, port, numberOfFilesShared, kbShared): | def pongReceived(self, descriptorId, ttl, hops, ipAddress, port, numberOfFilesShared, kbShared) """ Override this to handle pong messages. | bf45d1cf7d025b8c5439858dbb36e14a25a75ea7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bf45d1cf7d025b8c5439858dbb36e14a25a75ea7/gnutella.py |
mo = CONNSTRING.match(line): | mo = CONNSTRING.match(line) | def lineReceived(self, line): """ @precondition A GNUTELLA CONNECT must not already have been received.: not self.gothello: "line: %s" % str(line) """ assert not self.gothello, "precondition failure: A GNUTELLA CONNECT must not already have been received." + "--" + "line: %s" % str(line) mo = CONNSTRING.match(line): if... | bf45d1cf7d025b8c5439858dbb36e14a25a75ea7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bf45d1cf7d025b8c5439858dbb36e14a25a75ea7/gnutella.py |
self.assertNotIn('hi hi', req.transport.getvalue()) | self.assertEquals(-1, req.transport.getvalue().find('hi hi')) | def testImplicitHead(self): req = self._getReq() req.requestReceived('HEAD', '/newrender', 'HTTP/1.0') self.assertEquals(req.code, 200) self.assertNotIn('hi hi', req.transport.getvalue()) | 63fbfa7e0ce2f8d02d7a980e4f38345ccfaf4e38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/63fbfa7e0ce2f8d02d7a980e4f38345ccfaf4e38/test_web.py |
('TCP', (80, self.f), {'interface':'', 'backlog':5})) | ('TCP', (80, self.f), {'interface':'', 'backlog':50})) | def testSimpleNumeric(self): self.assertEqual(strports.parse('80', self.f), ('TCP', (80, self.f), {'interface':'', 'backlog':5})) | 67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e/test_strports.py |
('TCP', (80, self.f), {'interface':'', 'backlog':5})) | ('TCP', (80, self.f), {'interface':'', 'backlog':50})) | def testSimpleTCP(self): self.assertEqual(strports.parse('tcp:80', self.f), ('TCP', (80, self.f), {'interface':'', 'backlog':5})) | 67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e/test_strports.py |
{'interface':'127.0.0.1', 'backlog':5})) | {'interface':'127.0.0.1', 'backlog':50})) | def testInterfaceTCP(self): self.assertEqual(strports.parse('tcp:80:interface=127.0.0.1', self.f), ('TCP', (80, self.f), {'interface':'127.0.0.1', 'backlog':5})) | 67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e/test_strports.py |
{'mode':0666, 'backlog':5})) | {'mode':0666, 'backlog':50})) | def testSimpleUnix(self): self.assertEqual(strports.parse('unix:/var/run/finger', self.f), ('UNIX', ('/var/run/finger', self.f), {'mode':0666, 'backlog':5})) | 67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e/test_strports.py |
{'mode':0660, 'backlog':5})) | {'mode':0660, 'backlog':50})) | def testModedUNIX(self): self.assertEqual(strports.parse('unix:/var/run/finger:mode=0660', self.f), ('UNIX', ('/var/run/finger', self.f), {'mode':0660, 'backlog':5})) | 67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e/test_strports.py |
('TCP', (80, self.f), {'interface':'', 'backlog':5})) | ('TCP', (80, self.f), {'interface':'', 'backlog':50})) | def testAllKeywords(self): self.assertEqual(strports.parse('port=80', self.f), ('TCP', (80, self.f), {'interface':'', 'backlog':5})) | 67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e/test_strports.py |
{'mode':0666, 'backlog':5})) | {'mode':0666, 'backlog':50})) | def testEscape(self): self.assertEqual(strports.parse(r'unix:foo\:bar\=baz\:qux\\', self.f), ('UNIX', ('foo:bar=baz:qux\\', self.f), {'mode':0666, 'backlog':5})) | 67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e/test_strports.py |
{'mode':0666, 'backlog':5})) | {'mode':0666, 'backlog':50})) | def testImpliedEscape(self): self.assertEqual(strports.parse(r'unix:address=foo=bar', self.f), ('UNIX', ('foo=bar', self.f), {'mode':0666, 'backlog':5})) | 67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/67b1d6b02f0fa3aad8d8e3b6f4a7ba811c22853e/test_strports.py |
'%(python)s -c "from %(package)s.scripts.%(module)s import run; run()" %%$\n' | 'if NOT "%%_4ver%%" == "" %(python)s -c "from %(package)s.scripts.%(module)s import run; run()" %%$\n' 'if "%%_4ver%%" == "" %(python)s -c "from %(package)s.scripts.%(module)s import run; run()" %%*\n' | def copy_scripts(self): """ Create each script listed in 'self.scripts' """ if not self.package_name: raise Exception("You have to inherit build_scripts_create and" " provide a package name") to_module = string.maketrans('-/', '_.') | d3fafd02e2ab202e49ff8e45fc05c6b2f1798720 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3fafd02e2ab202e49ff8e45fc05c6b2f1798720/setup.py |
def parsemsg(s): prefix = '' trailing = [] if s[0] == ':': prefix, s = string.split(s[1:], maxsplit=1) if string.find(s,':') != -1: s, trailing = string.split(s, ':', 1) args = string.split(s) args.append(trailing) else: args = string.split(s) command = args.pop(0) return prefix, command, args | 2efd0f1bc60193fe713a625d23886a98808ed39a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2efd0f1bc60193fe713a625d23886a98808ed39a/irc.py | ||
relay.SMTPRelayer.sentMail(self, addresses) | def sentMail(self, addresses): """called when e-mail has been sent | 600fe4719d625a265d9b9b6cf9639ee92f6d9c86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/600fe4719d625a265d9b9b6cf9639ee92f6d9c86/relaymanager.py | |
def _finish(self, message): | def _finish(self, relay, message): self.managed[relay].remove(os.path.basename(message)) | def _finish(self, message): self.queue.done(message) | 600fe4719d625a265d9b9b6cf9639ee92f6d9c86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/600fe4719d625a265d9b9b6cf9639ee92f6d9c86/relaymanager.py |
self._finish(message) | self._finish(relay, message) | def notifySuccess(self, relay, message): """a relay sent a message successfully | 600fe4719d625a265d9b9b6cf9639ee92f6d9c86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/600fe4719d625a265d9b9b6cf9639ee92f6d9c86/relaymanager.py |
self._finish(message) | fp = self.queue.getEnvelopeFile(message) from_, to = cPickle.load(fp) fp.close() from_, to, bounce = bounce.generateBounceMessage(from_, to, open(self.queue.getPathFor(message)+'-D')) fp, message = self.queue.createNewMessage() cPickle.dump(fp, (from_, to)) fp.close() for line in string.split(bounce, '\n')[:-1]: messag... | def notifyFailure(self, relay, message): """Relaying the message has failed.""" log.msg("could not relay "+message) # Moshe - Bounce E-mail here # Be careful: if it's a bounced bounce, silently # discard it self._finish(message) | 600fe4719d625a265d9b9b6cf9639ee92f6d9c86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/600fe4719d625a265d9b9b6cf9639ee92f6d9c86/relaymanager.py |
self.queue.waiting(message) | self.queue.waiting[message] = 1 | def notifyDone(self, relay): """A relaying SMTP client is disconnected. | 600fe4719d625a265d9b9b6cf9639ee92f6d9c86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/600fe4719d625a265d9b9b6cf9639ee92f6d9c86/relaymanager.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.