logger.critical("You should use python 2.7.5 or greater. Your version: {0}.{1}.{2}".format(*sys.version_info))
sys.exit(0)
defconnectToStream(streamNumber):
@ -126,7 +128,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
else:
returnFalse
else:
print'Authentication failed because header lacks Authentication field'
logger.warn('Authentication failed because header lacks Authentication field')
time.sleep(2)
returnFalse
@ -276,7 +278,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
ifnumberOfAddresses>999:
return'API Error 0005: You have (accidentally?) specified too many addresses to make. Maximum 999. This check only exists to prevent mischief; if you really want to create more addresses than this, contact the Bitmessage developers and we can modify the check or you can do it yourself by searching the source code for this message.'
print'API Error 0007: Could not decode address:',address,':',status
logger.warn('API Error 0007: Could not decode address:',address,':',status)
ifstatus=='checksumfailed':
return'API Error 0008: Checksum failed for address: '+address
@ -808,8 +806,7 @@ if __name__ == "__main__":
except:
apiNotifyPath=''
ifapiNotifyPath!='':
withshared.printLock:
print'Trying to call',apiNotifyPath
logger.debug('Trying to call',apiNotifyPath)
call([apiNotifyPath,"startingUp"])
singleAPIThread=singleAPI()
@ -827,16 +824,15 @@ if __name__ == "__main__":
try:
fromPyQt4importQtCore,QtGui
exceptExceptionaserr:
print'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon'
print'Error message:',err
logger.error('PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon')