rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
def setTimeout(self, seconds, timeoutFunc=timeout, *args, **kw): """Set a timeout function to be triggered if I am not called. | 9a9c6eba8a24cf5bc608b60b67e8dec1d1cd8a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9a9c6eba8a24cf5bc608b60b67e8dec1d1cd8a58/defer.py | ||
def setTimeout(self, seconds, timeoutFunc=timeout, *args, **kw): """Set a timeout function to be triggered if I am not called. | 9a9c6eba8a24cf5bc608b60b67e8dec1d1cd8a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9a9c6eba8a24cf5bc608b60b67e8dec1d1cd8a58/defer.py | ||
return self.processNode(result.render(request)) | return self.processNode(request, result.render(request), node) | def dispatchResult(self, request, node, result): """ Check a given result from handling a node and hand it to a process* method which will convert the result into a node and insert it into the DOM tree. Return the new node. """ if isinstance(result, widgets.Widget): return self.processWidget(request, result, node) elif... | 26516b9173923b1560d58e68707a2e141bd8ad56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/26516b9173923b1560d58e68707a2e141bd8ad56/domtemplate.py |
from twisted.internet import defer | def failIfEqual(self, first, second, msg=None): """Fail if the two objects are equal as determined by the '==' operator. """ if first == second: raise self.failureException, (msg or '%s == %s' % (repr(first), repr(second))) | 94c2b1ad17f1c94c807871d064d7fb2958bcc7e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/94c2b1ad17f1c94c807871d064d7fb2958bcc7e8/unittest.py | |
reactor.stop() | def cleanup(self, ignored=None): from twisted.internet import reactor self.testResult.stopTest(self) #reactor.runUntilCurrent() reactor.stop() if self.testResult.wasSuccessful(): self.testResult.addSuccess(self) | 94c2b1ad17f1c94c807871d064d7fb2958bcc7e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/94c2b1ad17f1c94c807871d064d7fb2958bcc7e8/unittest.py | |
reactor.run() | reactor.runUntilCurrent() | def __call__(self, testResult=None): from twisted.internet import reactor if testResult is None: testResult = self.defaultTestResult() self.testResult = testResult self._runSetUp() reactor.run() | 94c2b1ad17f1c94c807871d064d7fb2958bcc7e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/94c2b1ad17f1c94c807871d064d7fb2958bcc7e8/unittest.py |
See L{IDAVAccessControlList.principalCollections}. | (RFC 3744, section 5.8) @return: a sequence of URIs which refer to collection resources that contain the principal resources that may be used by the access control list for this resource. | def principalCollections(self): """ See L{IDAVAccessControlList.principalCollections}. """ return () | f3c87ac02e6a01d977f5e5453677abc6ab39226e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f3c87ac02e6a01d977f5e5453677abc6ab39226e/resource.py |
See L{IDAVAccessControlList.accessControlList}. | @return: a L{davxml.ACL} element containing the access control list for this resource. | def accessControlList(self): """ See L{IDAVAccessControlList.accessControlList}. """ return allACL | f3c87ac02e6a01d977f5e5453677abc6ab39226e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f3c87ac02e6a01d977f5e5453677abc6ab39226e/resource.py |
See L{IDAVAccessControlList.supportedPrivileges}. | @return: a L{davxml.SupportedPrivilegeSet} element describing the access control privileges which are supported by this resource. | def supportedPrivileges(self): """ See L{IDAVAccessControlList.supportedPrivileges}. """ return allPrivilegeSet | f3c87ac02e6a01d977f5e5453677abc6ab39226e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f3c87ac02e6a01d977f5e5453677abc6ab39226e/resource.py |
davxml.Description("All access", **{"xml:lang": "en"}) | davxml.Description("all privileges", **{"xml:lang": "en"}) | def findChildren(self, depth): return () | f3c87ac02e6a01d977f5e5453677abc6ab39226e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f3c87ac02e6a01d977f5e5453677abc6ab39226e/resource.py |
if sys.version_info[0:2] == (2,2): self.registry._clearAdapterRegistry() self._suite = None return | def tearDown(self): from twisted import trial trial.tbformat = self.oldtbformat if sys.version_info[0:2] == (2,2): self.registry._clearAdapterRegistry() self._suite = None return super(TestFailureFormatting, self).tearDown() | f227c47f641566b6a8383c3c5d2901592e7f1300 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f227c47f641566b6a8383c3c5d2901592e7f1300/test_adapters.py | |
otherVersion = None | self.otherVersion = None | def __init__(self): self.buf = '' otherVersion = None # this gets set | 3a6b1c31192943ab63412a4567084c57e53bd839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3a6b1c31192943ab63412a4567084c57e53bd839/filetransfer.py |
words[0] = '\\fB' + words[0] + '\\fR' | words[0] = '\\fB' + words[0] + '\\fR ' | def macro_B(self, line): words = line.split() words[0] = '\\fB' + words[0] + '\\fR' self.text(' '.join(words)) | b9cf07b3c13ddb0889a2377566267a4285d8d287 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9cf07b3c13ddb0889a2377566267a4285d8d287/man2lore.py |
e = error.KeyNotFound(serviceName, perspectiveName) | e = KeyNotFound(serviceName, perspectiveName) | def requestPerspectiveForKey(self, serviceName, perspectiveName): """Get a perspective request (a Deferred) for the given key. | f08097e60c7b21060d7adc255a42069e39e28667 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f08097e60c7b21060d7adc255a42069e39e28667/identity.py |
TODO: * Login for IRCnets which require a PASS * Limit the length of messages sent (because the IRC server probably | @ivar nickname: Nickname the client will use. @ivar password: Password used to log on to the server. May be C{None}. @ivar realname: Supplied to the server during login as the \"Real name\" or \"ircname\". @ivar userinfo: Sent in reply to a X{USERINFO} CTCP query. If C{None}, no USERINFO reply will be sent. \"This i... | def irc_unknown(self, prefix, command, params): """Implement me!""" raise NotImplementedError | 5c7ccb39b148939a0f7b7f3aeb2619e173f82209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5c7ccb39b148939a0f7b7f3aeb2619e173f82209/irc.py |
* Add flood protection/rate limiting for my CTCP replies. * NickServ cooperation. (a mix-in?) | - Add flood protection/rate limiting for my CTCP replies. - NickServ cooperation. (a mix-in?) | def irc_unknown(self, prefix, command, params): """Implement me!""" raise NotImplementedError | 5c7ccb39b148939a0f7b7f3aeb2619e173f82209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5c7ccb39b148939a0f7b7f3aeb2619e173f82209/irc.py |
sourceHost = "twistedmatrix.com" sourceDir = "/downloads" sourceFiles = None | sourceURL = "http://twistedmatrix.com/downloads/" | def irc_unknown(self, prefix, command, params): """Implement me!""" raise NotImplementedError | 5c7ccb39b148939a0f7b7f3aeb2619e173f82209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5c7ccb39b148939a0f7b7f3aeb2619e173f82209/irc.py |
def irc_unknown(self, prefix, command, params): """Implement me!""" raise NotImplementedError | 5c7ccb39b148939a0f7b7f3aeb2619e173f82209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5c7ccb39b148939a0f7b7f3aeb2619e173f82209/irc.py | ||
queue = None sendDelay = 0 | _queue = None _queueEmptying = None | def irc_unknown(self, prefix, command, params): """Implement me!""" raise NotImplementedError | 5c7ccb39b148939a0f7b7f3aeb2619e173f82209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5c7ccb39b148939a0f7b7f3aeb2619e173f82209/irc.py |
self.queue.append(line) if len(self.queue) == 1: delay, self.sendDelay = self.sendDelay, 0 reactor.callLater(delay, self._sendLine) | self._queue.append(line) if not self._queueEmptying: self._queueEmptying = reactor.callLater(self.lineRate, self._sendLine) | def sendLine(self, line): if self.lineRate is None: basic.LineReceiver.sendLine(self, lowQuote(line)) else: self.queue.append(line) if len(self.queue) == 1: delay, self.sendDelay = self.sendDelay, 0 reactor.callLater(delay, self._sendLine) | 5c7ccb39b148939a0f7b7f3aeb2619e173f82209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5c7ccb39b148939a0f7b7f3aeb2619e173f82209/irc.py |
basic.LineReceiver.sendLine(self, lowQuote(self.queue.pop(0))) if len(self.queue): reactor.callLater(self.lineRate, self._sendLine) else: self.sendDelay = self.lineRate | if self._queue: basic.LineReceiver.sendLine(self, lowQuote(self._queue.pop(0))) self._queueEmptying = reactor.callLater(self.lineRate, self._sendLine) else: self._queueEmptying = None | def _sendLine(self): basic.LineReceiver.sendLine(self, lowQuote(self.queue.pop(0))) if len(self.queue): reactor.callLater(self.lineRate, self._sendLine) else: self.sendDelay = self.lineRate | 5c7ccb39b148939a0f7b7f3aeb2619e173f82209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5c7ccb39b148939a0f7b7f3aeb2619e173f82209/irc.py |
if self.sourceFiles: sourceFiles = string.join(self.sourceFiles, ' ') else: sourceFiles = '' self.ctcpMakeReply(nick, [('SOURCE', "%s:%s:%s" % (self.sourceHost, self.sourceDir, sourceFiles, )), ('SOURCE', None) ]) | self.ctcpMakeReply(nick, [('SOURCE', self.sourceURL), ('SOURCE', None)]) | def ctcpQuery_SOURCE(self, user, channel, data): if data is not None: self.quirkyMessage("Why did %s send '%s' with a SOURCE query?" % (user, data)) if self.sourceHost: nick = string.split(user,"!")[0] if self.sourceFiles: sourceFiles = string.join(self.sourceFiles, ' ') else: sourceFiles = '' self.ctcpMakeReply(nick, ... | 5c7ccb39b148939a0f7b7f3aeb2619e173f82209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5c7ccb39b148939a0f7b7f3aeb2619e173f82209/irc.py |
self.queue = [] | self._queue = [] | def connectionMade(self): self.queue = [] if self.performLogin: self.register(self.nickname) | 5c7ccb39b148939a0f7b7f3aeb2619e173f82209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5c7ccb39b148939a0f7b7f3aeb2619e173f82209/irc.py |
f.protocol = protocol.Protocol | f.protocol = NoopProtocol f.protocol.master = self self.serverConns = [] | def setUp(self): PortCleanerUpper.setUp(self) f = protocol.ServerFactory() f.protocol = protocol.Protocol self.listener = reactor.listenTCP(0, f, interface="127.0.0.1") self.ports.append(self.listener) self.clientF = f = protocol.ClientFactory() f.protocol = ConnectionLosingProtocol f.protocol.master = self def conne... | e4021b777f77eee7fbd8fff33ac9a99a56c56c0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e4021b777f77eee7fbd8fff33ac9a99a56c56c0d/test_tcp.py |
selectable = selectables[fd] | try: selectable = selectables[fd] except KeyError: continue | def doPoll(self, timeout, reads=reads, writes=writes, selectables=selectables, select=select, log=log, POLLIN=select.POLLIN, POLLOUT=select.POLLOUT): """Poll the poller for new events.""" if timeout is not None: timeout = int(timeout * 1000) # convert seconds to milliseconds | 679cb37bdd8d1ff5a9cda82c30ed8a5aac2a7ba5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/679cb37bdd8d1ff5a9cda82c30ed8a5aac2a7ba5/pollreactor.py |
os.rename(testdir, os.path.abspath("_trial_temp_old%s" % random.randint(0, 99999999))) | print "caught OSError [Errno %s]: %s: could not remove path %s" % (e.errno,e.strerror,e.filename) try: os.rename(testdir, os.path.abspath("_trial_temp_old%s" % random.randint(0, 99999999))) except OSError, e: print "caught OSError [Errno %s]: %s: could not rename path %s" % (e.errno,e.strerror,e.filename) raise | def _setUpTestdir(): testdir = os.path.abspath("_trial_temp") if os.path.exists(testdir): try: shutil.rmtree(testdir) except OSError, e: # XXX Left-over debug print? This is a pretty-dodgy exception handler, # overall. Also, this block is also incorrectly indented. os.rename(testdir, os.path.abspath("_trial_temp_old%... | e8e767faaa9f5204601fef8cd9ff537e00fc9052 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e8e767faaa9f5204601fef8cd9ff537e00fc9052/trial.py |
result = apply(func, args, kw) | result = func(*args, **kw) | def _no_log_output(func, *args, **kw): io = StringIO.StringIO() old = sys.stdout sys.stdout = io try: result = apply(func, args, kw) return result, io.getvalue() finally: sys.stdout = old | af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be/log.py |
result = apply(func, args, kw) | result = func(*args, **kw) | def _log_output(func, *args, **kw): io = Output() logOwner.own(io) try: result = apply(func, args, kw) return result, io.getvalue() finally: logOwner.disown(io) | af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be/log.py |
return apply([_no_log_output, _log_output] [isinstance(sys.stdout, Log)], (func,)+args,kw) | if isinstance(sys.stdout, Log): return _log_output(func, *args, **kw) return _no_log_output(func, *args, **kw) | def output(func, *args, **kw): return apply([_no_log_output, _log_output] [isinstance(sys.stdout, Log)], (func,)+args,kw) | af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be/log.py |
x = self.owners.pop() assert x is owner, "Bad disown" | if self.owners: x = self.owners.pop() if x is not owner: warnings.warn("Bad disown: %r is not %r" % (x, owner)) else: warnings.warn("Bad disown: %r, owner stack is empty" % (owner,)) | def disown(self, owner): """Remove an object as owner of the log.""" if owner is not None: x = self.owners.pop() assert x is owner, "Bad disown" | af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be/log.py |
owners = self.ownersPerThread.get(i,[]) owners.append(owner) self.ownersPerThread[i] = owners | self.ownersPerThread.setdefault(i, []).append(owner) | def own(self, owner): """Set an object as owner of the log.""" if owner is not None: i = self.threadId() owners = self.ownersPerThread.get(i,[]) owners.append(owner) self.ownersPerThread[i] = owners | af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be/log.py |
apply(real_msg, stuff) | real_msg(*stuff) | def _threaded_msg(*stuff): loglock.acquire() apply(real_msg, stuff) loglock.release() | af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/af4ede5c6aee9a0e2cb8ef0aaab9c4bba0ef16be/log.py |
try: util.untilConcludes(self.w.send, 'x') except OSError, e: if e.errno != errno.EAGAIN: raise | self.w.send('x') | 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 | b5c673813f0803a1535107ea7b90243df9a46279 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b5c673813f0803a1535107ea7b90243df9a46279/posixbase.py |
try: util.untilConcludes(os.write, self.o, 'x') except OSError, e: if e.errno != errno.EAGAIN: raise | util.untilConcludes(os.write, self.o, 'x') | def wakeUp(self): """Write one byte to the pipe, and flush it. """ if self.o is not None: try: util.untilConcludes(os.write, self.o, 'x') except OSError, e: if e.errno != errno.EAGAIN: raise | b5c673813f0803a1535107ea7b90243df9a46279 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b5c673813f0803a1535107ea7b90243df9a46279/posixbase.py |
text=string.replace(text,'&','&') | def dehtml(text): text=string.replace(text,"<br>","\n") text=string.replace(text,"<BR>","\n") text=string.replace(text,"<Br>","\n") # XXX make this a regexp text=string.replace(text,"<bR>","\n") text=re.sub('<.*?>','',text) text=string.replace(text,'>','>') text=string.replace(text,'<','<') text=string.replace(te... | 594493f6713edc4944bb4e3a6a69bdbe8aeb1481 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/594493f6713edc4944bb4e3a6a69bdbe8aeb1481/oscar.py | |
text=string.replace(text,'&','&') text=string.replace(text,'<','<') text=string.replace(text,'>','>') | text=string.replace(text,'&','&') text=string.replace(text,'<','<') text=string.replace(text,'>','>') | def html(text): text=string.replace(text,'"','"') text=string.replace(text,'&','&') text=string.replace(text,'<','<') text=string.replace(text,'>','>') text=string.replace(text,"\n","<br>") return '<html><body bgcolor="white"><font color="black">%s</font></body></html>'%text | 594493f6713edc4944bb4e3a6a69bdbe8aeb1481 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/594493f6713edc4944bb4e3a6a69bdbe8aeb1481/oscar.py |
args, varargs, varkw, defaults = inspect.getargspec( func) | args, varargs, varkw, defaults = inspect.getargspec(func) | def aggregateValid(self, request, inputhandler, data): """Aggregate valid input from inputhandlers below us into a list until we have all input from controllers below us to pass to the commit function that was passed to the constructor or our parent's aggregateValid. """ if self._commit: # Introspect the commit functio... | ac377ec9cbb9a0a24f84369ba72af9f0e119f8e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/ac377ec9cbb9a0a24f84369ba72af9f0e119f8e3/input.py |
app = Application("pb-test") ident = identity.Identity("guest", app) | auth = authorizer.DefaultAuthorizer() appl = Application("pb-test") auth.setApplication(appl) ident = identity.Identity("guest", authorizer=auth) | def connectedServerAndClient(): """Returns a 3-tuple: (client, server, pump) """ c = pb.Broker() app = Application("pb-test") ident = identity.Identity("guest", app) ident.setPassword("guest") svc = DummyService("test", app) ident.addKeyForPerspective(svc.getPerspectiveNamed("any")) app.authorizer.addIdentity(ident) sv... | a51b90128ea6916c7f6c70506ab80633f1f5d41a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a51b90128ea6916c7f6c70506ab80633f1f5d41a/test_pb.py |
svc = DummyService("test", app) | svc = DummyService("test", appl, authorizer=auth) | def connectedServerAndClient(): """Returns a 3-tuple: (client, server, pump) """ c = pb.Broker() app = Application("pb-test") ident = identity.Identity("guest", app) ident.setPassword("guest") svc = DummyService("test", app) ident.addKeyForPerspective(svc.getPerspectiveNamed("any")) app.authorizer.addIdentity(ident) sv... | a51b90128ea6916c7f6c70506ab80633f1f5d41a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a51b90128ea6916c7f6c70506ab80633f1f5d41a/test_pb.py |
app.authorizer.addIdentity(ident) svr = pb.BrokerFactory(pb.AuthRoot(app)) | auth.addIdentity(ident) svr = pb.BrokerFactory(pb.AuthRoot(auth)) | def connectedServerAndClient(): """Returns a 3-tuple: (client, server, pump) """ c = pb.Broker() app = Application("pb-test") ident = identity.Identity("guest", app) ident.setPassword("guest") svc = DummyService("test", app) ident.addKeyForPerspective(svc.getPerspectiveNamed("any")) app.authorizer.addIdentity(ident) sv... | a51b90128ea6916c7f6c70506ab80633f1f5d41a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a51b90128ea6916c7f6c70506ab80633f1f5d41a/test_pb.py |
self._connected = False | def __init__(self, port, proto, interface='', maxPacketSize=8192, reactor=None): """Initialize with a numeric port to listen on. """ assert isinstance(proto, protocol.DatagramProtocol) base.BasePort.__init__(self, reactor) self.port = port self.protocol = proto self.maxPacketSize = maxPacketSize self.interface = interf... | 23edc5b661490b32d25a539522b8339b4f2c8195 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/23edc5b661490b32d25a539522b8339b4f2c8195/udp.py | |
pass | if self._connectedAddr: self.protocol.connectionRefused() | def doRead(self): """Called when my socket is ready for reading.""" read = 0 while read < self.maxThroughput: try: data, addr = self.socket.recvfrom(self.maxPacketSize) read += len(data) self.protocol.datagramReceived(data, addr) except socket.error, se: no = se.args[0] if no in (EAGAIN, EINTR, EWOULDBLOCK): return if ... | 23edc5b661490b32d25a539522b8339b4f2c8195 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/23edc5b661490b32d25a539522b8339b4f2c8195/udp.py |
if self._connected: | if self._connectedAddr: | def write(self, datagram, addr=None): """Write a datagram. | 23edc5b661490b32d25a539522b8339b4f2c8195 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/23edc5b661490b32d25a539522b8339b4f2c8195/udp.py |
if self._connected: | if self._connectedAddr: | def connect(self, host, port): """'Connect' to remote server.""" if self._connected: raise RuntimeError, "already connected, reconnecting is not currently supported" if not abstract.isIPAddress(host): raise ValueError, "please pass only IP addresses, not domain names" self._connected = True self._connectedAddr = (host,... | 23edc5b661490b32d25a539522b8339b4f2c8195 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/23edc5b661490b32d25a539522b8339b4f2c8195/udp.py |
self._connected = True | def connect(self, host, port): """'Connect' to remote server.""" if self._connected: raise RuntimeError, "already connected, reconnecting is not currently supported" if not abstract.isIPAddress(host): raise ValueError, "please pass only IP addresses, not domain names" self._connected = True self._connectedAddr = (host,... | 23edc5b661490b32d25a539522b8339b4f2c8195 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/23edc5b661490b32d25a539522b8339b4f2c8195/udp.py | |
elif se.args[0] in (EWOULDBLOCK, EINVAL, EINPROGRESS, EALREADY): | elif ((se.args[0] in (EWOULDBLOCK, EINPROGRESS, EALREADY)) or (se.args[0] == EINVAL and platform.getType() == "win32")): | def doConnect(self): """I connect the socket. | 1048841f8029c74d98c65f8098bd6b0b9aaf7588 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1048841f8029c74d98c65f8098bd6b0b9aaf7588/tcp.py |
def getDestination(self): """Return destination this will try to connect to. | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
def lookupAddress(self, name, timeout = 10): """Resolve the domain name C{name} into an IP address. @type name: C{str} @type timeout: C{int} @rtype: C{Deferred} @raise C{twisted.internet.defer.TimeoutError}: Raised if the name cannot be resolved within the specified timeout period. """ | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
@returns: an object that satisfies the IListeningPort interface @raise CannotListenError: as defined in twisted.internet.error, if it cannot listen on this port (e.g., it cannot bind to the required port number) | @param port: a port number on which to listen @param factory: a twisted.internet.protocol.ServerFactory instance @param backlog: size of the listen queue @param interface: the hostname to bind to, defaults to '' (all) @returns: an object that satisfies the IListeningPort interface @raise CannotListenError: as defi... | def listenTCP(self, port, factory, backlog=5, interface=''): """Connects a given protocol factory to the given numeric TCP/IP port. | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py |
def listenUNIX(address, factory, backlog=5): """Listen on a UNIX socket. | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
def connectUDP(self, remotehost, remoteport, protocol, localport=0, interface='', maxPacketSize=8192): """Connects a L{ConnectedDatagramProtocol} instance to a UDP port. """ | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
def spawnProcess(self, processProtocol, executable, args=(), env={}, path=None, uid=None, gid=None, usePTY=0): """Spawn a process, with a process protcol. | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
@param usePTY: if true, run this process in a psuedo-terminal. | @param usePTY: if true, run this process in a psuedo-terminal. | def spawnProcess(self, processProtocol, executable, args=(), env={}, path=None, uid=None, gid=None, usePTY=0): """Spawn a process, with a process protcol. | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py |
def cancelCallLater(self, callID): """This method is deprecated. Cancel a call that would happen later. | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
@raise ValueError: if the callID is not recognized. | @raise ValueError: if the callID is not recognized. | def cancelCallLater(self, callID): """This method is deprecated. Cancel a call that would happen later. | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py |
def getOutgoingInterface(self): """Return interface of outgoing multicast packets.""" | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
def setOutgoingInterface(self, addr): """Set interface for outgoing multicast packets. | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
def getLoopbackMode(self): """Return if loopback mode is enabled.""" | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
def getTTL(self): """Get time to live for multicast packets.""" | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
def joinGroup(self, addr, interface=""): """Join a multicast group. Returns Deferred of success.""" | 0ed5a9b6815983fd5514bcb4402fd64f53334b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ed5a9b6815983fd5514bcb4402fd64f53334b4a/interfaces.py | ||
self.controller = self | if self.controller is None: self.controller = self | def __init__(self, model = None): Resource.__init__(self) View.__init__(self, model) self.controller = self self.model = model self.templateMethods = MethodLookup() self.setTemplateMethods( self.getTemplateMethods() ) self.outstandingCallbacks = 0 | e0657ddf2af63f3d5db74ae422e1819a8e438070 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e0657ddf2af63f3d5db74ae422e1819a8e438070/domtemplate.py |
fname = os.path.splitext(href) node.setAttribute("href", fname[0] + ext) | fname, fext = os.path.splitext(href) fext = fext.replace('.html', ext) node.setAttribute("href", fname + fext) | def fixLinks(document, ext): for node in domhelpers.findElementsWithAttribute(document, 'href'): href = node.getAttribute("href") if '/' not in href: if href.endswith('.html') or href[:href.rfind('#')].endswith('.html'): fname = os.path.splitext(href) node.setAttribute("href", fname[0] + ext) | 33eb43c7f146257a4375086e2112f72df92a003e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/33eb43c7f146257a4375086e2112f72df92a003e/tree.py |
or \"ircname\". | or \"ircname\". May be C{None}. @ivar username: Supplied to the server during login as the \"User name\". May be C{None} | def channelMode(self, user, channel, mode, *args): """ Send information about the mode of a channel. | b526efe175e1630ebc066e745717ecdeb64584ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b526efe175e1630ebc066e745717ecdeb64584ef/irc.py |
self.sendLine("USER %s foo bar :%s" % (nickname, self.realname)) | if self.username is None: self.username = nickname self.sendLine("USER %s foo bar :%s" % (self.username, self.realname)) | def register(self, nickname, hostname='foo', servername='bar'): if self.password is not None: self.sendLine("PASS %s" % self.password) self.setNick(nickname) self.sendLine("USER %s foo bar :%s" % (nickname, self.realname)) | b526efe175e1630ebc066e745717ecdeb64584ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b526efe175e1630ebc066e745717ecdeb64584ef/irc.py |
pdb.run("application.run(%d)" % (not config.opts['no_save'])) | pdb.run("application.run(%d)" % (not config.opts['no_save']), globals(), locals()) | def callMeAgain(self): reactor.callLater(0.1, self.callMeAgain) | 3c95a04be81bffcedca87bd9460e61820b1621af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3c95a04be81bffcedca87bd9460e61820b1621af/twistd.py |
_1_RESPONSES = ('CAPABILITY', 'LIST', 'LSUB', 'STATUS', 'SEARCH') _2_RESPONSES = ('EXISTS', 'EXPUNGE', 'FETCH') | _1_RESPONSES = ('CAPABILITY', 'FLAGS', 'LIST', 'LSUB', 'STATUS', 'SEARCH') _2_RESPONSES = ('EXISTS', 'EXPUNGE', 'FETCH', 'RECENT') | def maybeDeferred(obj, cb, eb, cbArgs, ebArgs): if isinstance(obj, defer.Deferred): obj.addCallbacks(cb, eb, callbackArgs=cbArgs, errbackArgs=ebArgs) else: cb(obj, *cbArgs) | 32461f21b044aa5b0cb49b3d010932d8c659a54a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/32461f21b044aa5b0cb49b3d010932d8c659a54a/imap4.py |
def __init__(self, model): view.View.__init__(self, model) | def __init__(self, model, *args, **kwargs): view.View.__init__(self, model, *args, **kwargs) | def __init__(self, model): view.View.__init__(self, model) self.model.addView(self) # pretend self.foo is what the user now sees on their screen self.foo = self.model.foo self.random = self.model.random | 2f1b27e71dd497cf3aafa704bf6decda00372f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2f1b27e71dd497cf3aafa704bf6decda00372f4b/test_mvc.py |
_res = getattr(res, fn)(*args, **kwargs) res = _res is None and res or _res | if fn == '__getitem__' and isinstance(res, list) and isinstance(args[0], types.SliceType): res = res[args[0].start:args[0].stop] else: _res = getattr(res, fn)(*args, **kwargs) res = _res is None and res or _res | def __call__(self, res): for fn, args, kwargs in self.callstack: if isinstance(fn, Recipe): res = fn(res) else: _res = getattr(res, fn)(*args, **kwargs) res = _res is None and res or _res return res | f0c3d8c872147c783c764eb9a1a98d8e1c1a7717 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f0c3d8c872147c783c764eb9a1a98d8e1c1a7717/cake.py |
if collection is not None: | configurator = coil.getConfigurator(entity) if collection or configurator: | def displayTreeElement(self, write, inName, inPath, collection, indentLevel=0): subIndent = indentLevel + 1 for name, entity in collection.listStaticEntities(): collection = coil.getCollection(entity) if collection is not None: write('%s + <a href="%s/%s">%s</a> <br>' % (indentLevel * ' ', inPath, name, name)) sel... | 1f122bb3850d13f1f283e90087c175a4016a47cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1f122bb3850d13f1f283e90087c175a4016a47cd/web.py |
self.displayTreeElement(write, name, '%s/%s' % (inPath, name), collection, subIndent) | if collection: self.displayTreeElement(write, name, '%s/%s' % (inPath, name), collection, subIndent) | def displayTreeElement(self, write, inName, inPath, collection, indentLevel=0): subIndent = indentLevel + 1 for name, entity in collection.listStaticEntities(): collection = coil.getCollection(entity) if collection is not None: write('%s + <a href="%s/%s">%s</a> <br>' % (indentLevel * ' ', inPath, name, name)) sel... | 1f122bb3850d13f1f283e90087c175a4016a47cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1f122bb3850d13f1f283e90087c175a4016a47cd/web.py |
isLeaf = 1 | def wmfactory_form(self, request): if self.formModel: return self.formModel else: return guard.newLoginSignature.method(None) | 3dea08f3416ddddb6248150c22db8174406006ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3dea08f3416ddddb6248150c22db8174406006ec/login.py | |
isLeaf = 1 | def wchild_stuff(self, request): return self | 3dea08f3416ddddb6248150c22db8174406006ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3dea08f3416ddddb6248150c22db8174406006ec/login.py | |
self.write('') | if len(self.client.buf)>1: b = self.client.buf[1:] self.client.buf = '' self.write(b) | def channelOpen(self, specificData): log.msg('opened forwarding channel %s' % self.id) self.write('') # send the buffer | 6abbbb7ba36200c286c3f9874e7ccdc6bb83d0ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6abbbb7ba36200c286c3f9874e7ccdc6bb83d0ce/forwarding.py |
self.channel.write(data) | if self.buf: self.buf += data else: self.channel.write(data) | def dataReceived(self, data): self.channel.write(data) | 6abbbb7ba36200c286c3f9874e7ccdc6bb83d0ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6abbbb7ba36200c286c3f9874e7ccdc6bb83d0ce/forwarding.py |
return "<DelayedCall [%ds] called=%s cancelled=%s %s%s>" % (self.time - time(), self.called, self.cancelled, func, reflect.safe_repr(self.args)) | return "<DelayedCall %s [%ss] called=%s cancelled=%s %s%s>" % ( id(self), self.time - time(), self.called, self.cancelled, func, reflect.safe_repr(self.args)) | def __str__(self): try: func = self.func.func_name try: func = self.func.im_class.__name__ + '.' + func except: func = self.func if hasattr(func, 'func_code'): func = func.func_code # func_code's repr sometimes has more useful info except: func = reflect.safe_repr(self.func) return "<DelayedCall [%ds] called=%s cancell... | 4d1a5a57472f192ec7168b438c002f8e6f7b8343 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4d1a5a57472f192ec7168b438c002f8e6f7b8343/base.py |
_implList = [IReactorCore, IReactorTime, IReactorPluggableResolver] if platform.supportsThreads(): _implList.append(IReactorThreads) implements(*_implList) del _implList | implements(IReactorCore, IReactorTime, IReactorPluggableResolver) | def getHostByName(self, name, timeout = (1, 3, 11, 45)): try: address = socket.gethostbyname(name) except socket.error: msg = "address %r not found" % (name,) err = error.DNSLookupError(msg) return defer.fail(err) else: return defer.succeed(address) | 9e1133e4c44862064201dc22a6195ff177ffa878 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9e1133e4c44862064201dc22a6195ff177ffa878/base.py |
"""Test that reactor.stop terminates reactor.run""" reactor.callLater(0.1, self.stop) reactor.run() reactor.callLater(0.1, self.stop) reactor.run() | """Test that reactor.crash terminates reactor.run""" reactor.callLater(0.1, self.crash) reactor.run() reactor.callLater(0.1, self.crash) reactor.run() | def testRun(self): """Test that reactor.stop terminates reactor.run""" reactor.callLater(0.1, self.stop) reactor.run() # returns once .stop is called reactor.callLater(0.1, self.stop) reactor.run() # returns once .stop is called | 0be193f40bb591ab4fea5811eacda01a0a047326 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0be193f40bb591ab4fea5811eacda01a0a047326/test_internet.py |
t = reactor.callLater(10, self.stop) | t = reactor.callLater(10, self.crash) | def testIterate(self): """Test that reactor.iterate(0) doesn't block""" start = time.time() # twisted timers are distinct from the underlying event loop's # timers, so this fail-safe probably won't keep a failure from # hanging the test t = reactor.callLater(10, self.stop) reactor.iterate(0) # shouldn't block stop = ti... | 0be193f40bb591ab4fea5811eacda01a0a047326 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0be193f40bb591ab4fea5811eacda01a0a047326/test_internet.py |
def testStop(self): """reactor.stop should fire shutdown triggers""" self.counter = 0 self.problem = 0 self.addTrigger("before", "shutdown", self.count) self.addTimer(0.1, self.stop) t = self.addTimer(5, self.timeout) reactor.run() self.failUnless(self.counter == 1, "reactor.stop didn't invoke shutdown triggers") self... | def testStop(self): """reactor.stop should fire shutdown triggers""" # make sure shutdown triggers are run when the reactor is stopped self.counter = 0 self.problem = 0 self.addTrigger("before", "shutdown", self.count) self.addTimer(0.1, self.stop) t = self.addTimer(5, self.timeout) reactor.run() self.failUnless(self.c... | 0be193f40bb591ab4fea5811eacda01a0a047326 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0be193f40bb591ab4fea5811eacda01a0a047326/test_internet.py | |
self.protocol.makeConnection(self) | def __init__(self, protocol, deviceNameOrPortNumber, reactor, baudrate = 9600, bytesize = EIGHTBITS, parity = PARITY_NONE, stopbits = STOPBITS_ONE, xonxoff = 0, rtscts = 0): self._serial = serial.Serial(deviceNameOrPortNumber, baudrate=baudrate, bytesize=bytesize, parity=parity, stopbits=stopbits, timeout=None, xonxoff... | 3fcad80c165528d25dde23644c3bc4525069ef8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3fcad80c165528d25dde23644c3bc4525069ef8d/win32serialport.py | |
newNode = self.getPattern('item') | newNode = self.getPattern('item', _RAISE) | def generateDOM(self, request, node): node = Widget.generateDOM(self, request, node) domhelpers.clearNode(node) if self.end: listSize = self.end - self.start if listSize > len(self.getData()): listSize = len(self.getData()) else: listSize = len(self.getData()) for itemNum in range(listSize): if itemNum % self.columns ... | cfd098f1b0aa556a0195f80f0be103e129e4e4bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/cfd098f1b0aa556a0195f80f0be103e129e4e4bb/widgets.py |
if not newNode.getAttribute("view"): newNode.setAttribute("view", "DefaultWidget") | def generateDOM(self, request, node): node = Widget.generateDOM(self, request, node) domhelpers.clearNode(node) if self.end: listSize = self.end - self.start if listSize > len(self.getData()): listSize = len(self.getData()) else: listSize = len(self.getData()) for itemNum in range(listSize): if itemNum % self.columns ... | cfd098f1b0aa556a0195f80f0be103e129e4e4bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/cfd098f1b0aa556a0195f80f0be103e129e4e4bb/widgets.py | |
class WhatchuTalkinBoutWillisError(Exception): | class ArgumentError(Exception): | def remove(self): if self in log.theLogPublisher.observers: log.removeObserver(self) | 44810fc1456fc104e486a733307c26c4f0104e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/44810fc1456fc104e486a733307c26c4f0104e37/trial.py |
except WhatchuTalkinBoutWillisError: | except ArgumentError: | def _handleFile(self, filename): m = None if osp.isfile(filename): try: mname = reflect.filenameToModuleName(filename) self._tryNamedAny(mname) except WhatchuTalkinBoutWillisError: # okay, not in PYTHONPATH... path, fullname = osp.split(filename) name, ext = osp.splitext(fullname) m = new.module(name) sourcestring = fi... | 44810fc1456fc104e486a733307c26c4f0104e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/44810fc1456fc104e486a733307c26c4f0104e37/trial.py |
raise WhatchuTalkinBoutWillisError | raise ArgumentError | def _tryNamedAny(self, arg): try: n = reflect.namedAny(arg) except ValueError: raise WhatchuTalkinBoutWillisError except: f = failure.Failure() f.printTraceback() self['_couldNotImport'][arg] = f return | 44810fc1456fc104e486a733307c26c4f0104e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/44810fc1456fc104e486a733307c26c4f0104e37/trial.py |
raise WhatchuTalkinBoutWillisError, "could not figure out how to use %s" % arg | raise ArgumentError, "could not figure out how to use %s" % arg | def _tryNamedAny(self, arg): try: n = reflect.namedAny(arg) except ValueError: raise WhatchuTalkinBoutWillisError except: f = failure.Failure() f.printTraceback() self['_couldNotImport'][arg] = f return | 44810fc1456fc104e486a733307c26c4f0104e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/44810fc1456fc104e486a733307c26c4f0104e37/trial.py |
except WhatchuTalkinBoutWillisError: | except ArgumentError: | def _dbg(msg): if self._logObserver is not None: log.msg(iface=ITrialDebug, parseargs=msg) | 44810fc1456fc104e486a733307c26c4f0104e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/44810fc1456fc104e486a733307c26c4f0104e37/trial.py |
print "can't figure out what to do with argument %r, continuing" % (arg,) continue | raise ArgumentError, ("argument %r appears to be " "invalid, rather than doing something incredibly stupid, " "I'm blowing up" % (arg,)) | def _dbg(msg): if self._logObserver is not None: log.msg(iface=ITrialDebug, parseargs=msg) | 44810fc1456fc104e486a733307c26c4f0104e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/44810fc1456fc104e486a733307c26c4f0104e37/trial.py |
if hasattr(ob, '__class__'): fixClassImplements(ob.__class__) | def _hook(iface, ob, lookup=globalRegistry.lookup1): # FIXME: Workaround zope.interface bug: # Once you look up something in AdapterRegistry, # any further 'classProvides(Only)' statements will not work. # Until this is fixed, make *sure* fixClassImplements was # called before looking anything up in AdapterRegistry. # ... | 00ebf1a1b482ac1f5028e713c4547eaca848cfb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/00ebf1a1b482ac1f5028e713c4547eaca848cfb3/components.py | |
def __init__(self): | def __init__(self, homeDir): | def __init__(self): avatar.ConchUser.__init__(self) self.channelLookup['session'] = session.SSHSession self.subsystemLookup['sftp'] = filetransfer.FileTransferServer | 72db7f8c9404cd7ecf572677fd09d4f372051152 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/72db7f8c9404cd7ecf572677fd09d4f372051152/test_filetransfer.py |
return os.path.join(os.getcwd(), 'sftp_test') | return os.path.join(os.getcwd(), self.homeDir) | def getHomeDir(self): return os.path.join(os.getcwd(), 'sftp_test') | 72db7f8c9404cd7ecf572677fd09d4f372051152 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/72db7f8c9404cd7ecf572677fd09d4f372051152/test_filetransfer.py |
try: os.mkdir('sftp_test') except OSError, e: if e.args[0] == 17: pass try: os.mkdir('sftp_test/testDirectory') except OSError, e: if e.args[0] == 17: pass f=file('sftp_test/testfile1','w') | self.test_dir = self.mktemp() os.makedirs(os.path.join(self.test_dir, 'testDirectory')) f = file(os.path.join(self.test_dir, 'testfile1'),'w') | def setUp(self): try: os.mkdir('sftp_test') except OSError, e: if e.args[0] == 17: pass try: os.mkdir('sftp_test/testDirectory') except OSError, e: if e.args[0] == 17: pass | 72db7f8c9404cd7ecf572677fd09d4f372051152 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/72db7f8c9404cd7ecf572677fd09d4f372051152/test_filetransfer.py |
os.chmod('sftp_test/testfile1', 0644) file('sftp_test/testRemoveFile', 'w').write('a') file('sftp_test/testRenameFile', 'w').write('a') file('sftp_test/.testHiddenFile', 'w').write('a') def tearDown(self): for f in ['testfile1', 'testRemoveFile', 'testRenameFile', 'testRenamedFile', 'testLink', 'testfile2', '.testHid... | os.chmod(os.path.join(self.test_dir, 'testfile1'), 0644) file(os.path.join(self.test_dir, 'testRemoveFile'), 'w').write('a') file(os.path.join(self.test_dir, 'testRenameFile'), 'w').write('a') file(os.path.join(self.test_dir, '.testHiddenFile'), 'w').write('a') | def setUp(self): try: os.mkdir('sftp_test') except OSError, e: if e.args[0] == 17: pass try: os.mkdir('sftp_test/testDirectory') except OSError, e: if e.args[0] == 17: pass | 72db7f8c9404cd7ecf572677fd09d4f372051152 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/72db7f8c9404cd7ecf572677fd09d4f372051152/test_filetransfer.py |
self.avatar = FileTransferTestAvatar() | SFTPTestBase.setUp(self) self.avatar = FileTransferTestAvatar(self.test_dir) | def setUp(self): self.avatar = FileTransferTestAvatar() self.server = filetransfer.FileTransferServer(avatar=self.avatar) clientTransport = loopback.LoopbackRelay(self.server) | 72db7f8c9404cd7ecf572677fd09d4f372051152 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/72db7f8c9404cd7ecf572677fd09d4f372051152/test_filetransfer.py |
SFTPTestBase.setUp(self) | def _(serverVersion, extData): self._serverVersion = serverVersion self._extData = extData | 72db7f8c9404cd7ecf572677fd09d4f372051152 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/72db7f8c9404cd7ecf572677fd09d4f372051152/test_filetransfer.py | |
os.path.join(os.getcwd(), 'sftp_test', 'testfile1')) | os.path.join(os.getcwd(), self.test_dir, 'testfile1')) | def _readLink(_): d = self.client.readLink('testLink') self._emptyBuffers() d.addCallback(self.failUnlessEqual, os.path.join(os.getcwd(), 'sftp_test', 'testfile1')) return d | 72db7f8c9404cd7ecf572677fd09d4f372051152 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/72db7f8c9404cd7ecf572677fd09d4f372051152/test_filetransfer.py |
os.path.join(os.getcwd(), 'sftp_test', 'testfile1')) | os.path.join(os.getcwd(), self.test_dir, 'testfile1')) | def _realPath(_): d = self.client.realPath('testLink') self._emptyBuffers() d.addCallback(self.failUnlessEqual, os.path.join(os.getcwd(), 'sftp_test', 'testfile1')) return d | 72db7f8c9404cd7ecf572677fd09d4f372051152 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/72db7f8c9404cd7ecf572677fd09d4f372051152/test_filetransfer.py |
if (dav_namespace, "getcontenttype") in self.dead_properties: return self.dead_properties[(dav_namespace, "getcontenttype")] | if (davxml.dav_namespace, "getcontenttype") in self.dead_properties: return self.dead_properties[(davxml.dav_namespace, "getcontenttype")] | def contentType(self): # Allow dead property to override if (dav_namespace, "getcontenttype") in self.dead_properties: return self.dead_properties[(dav_namespace, "getcontenttype")] else: return super(DAVFile, self).contentType() | e83fa2106165cb46d062e04a75ea27cd7464cb6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e83fa2106165cb46d062e04a75ea27cd7464cb6b/static.py |
if (dav_namespace, "displayname") in self.dead_properties: return self.dead_properties[(dav_namespace, "displayname")] | if (davxml.dav_namespace, "displayname") in self.dead_properties: return self.dead_properties[(davxml.dav_namespace, "displayname")] | def displayName(self): # Allow dead property to override if (dav_namespace, "displayname") in self.dead_properties: return self.dead_properties[(dav_namespace, "displayname")] else: return super(DAVFile, self).displayName() | e83fa2106165cb46d062e04a75ea27cd7464cb6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e83fa2106165cb46d062e04a75ea27cd7464cb6b/static.py |
whenDone() | task.schedule(whenDone) | def __init__(self, host, port, protocol, timeout=None, connector=None): """Initialize the client, setting up its socket, and request to connect. """ if host == 'unix': # "port" in this case is really a filename try: mode = os.stat(port)[0] except OSError, ose: protocol.connectionFailed() # no such file or directory re... | 9b7cdd01ca433fda99796fad2a9bef4907d56fcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b7cdd01ca433fda99796fad2a9bef4907d56fcb/tcp.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.