Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
job.callback('failed', msg)
job._putResult(FCPProtocolError(msg))
return
if hdr == 'IdentifierCollision':
log(ERROR, "IdentifierCollision on id %s ???" % id)
job.callback('failed', msg)
job._putResult(Exception("Duplicate job identifier %s" % id))
return
# -----------------------------
# wtf is happening here?!?
log(ERROR, "Unknown message type from node: %s" % hdr)
job.callback('failed', msg)
job._putResult(FCPException(msg))
return
def _on_clientReq(self, job):
def __str__(self):
parts = []
for k in ['header', 'ShortCodeDescription', 'CodeDescription']:
if self.info.has_key(k):
parts.append(str(self.info[k]))
return ";".join(parts) or "??"
class FCPGetFailed(FCPException):
pass
class FCPPutFailed(FCPException):
pass
class FCPProtocolError(FCPException):
pass
# where we can find the freenet node FCP port
defaultFCPHost = "127.0.0.1"
defaultFCPPort = 9481
# poll timeout period for manager thread
pollTimeout = 0.1
#pollTimeout = 3
# list of keywords sent from node to client, which have
# int values
intKeys = [
'DataLength', 'Code',
]
def __init__(self, info=None):
print "Creating fcp exception"
if not info:
info = {}
self.info = info
print "fcp exception created"
def __str__(self):
parts = []
for k in ['header', 'ShortCodeDescription', 'CodeDescription']:
if self.info.has_key(k):
parts.append(str(self.info[k]))
return ";".join(parts) or "??"
class FCPGetFailed(FCPException):
pass
class FCPPutFailed(FCPException):
pass
class FCPProtocolError(FCPException):
pass
# where we can find the freenet node FCP port
defaultFCPHost = "127.0.0.1"
defaultFCPPort = 9481
# poll timeout period for manager thread
pollTimeout = 0.1
#pollTimeout = 3
info = {}
self.info = info
print "fcp exception created"
def __str__(self):
parts = []
for k in ['header', 'ShortCodeDescription', 'CodeDescription']:
if self.info.has_key(k):
parts.append(str(self.info[k]))
return ";".join(parts) or "??"
class FCPGetFailed(FCPException):
pass
class FCPPutFailed(FCPException):
pass
class FCPProtocolError(FCPException):
pass
# where we can find the freenet node FCP port
defaultFCPHost = "127.0.0.1"
defaultFCPPort = 9481
# poll timeout period for manager thread
pollTimeout = 0.1
#pollTimeout = 3
# list of keywords sent from node to client, which have
# int values
intKeys = [