Rev267, Hotfix for problems caused by changes in rev260, Fix unhandled exception on failed port checking

This commit is contained in:
HelloZeroNet 2015-07-02 02:31:52 +02:00
parent 0ca0c754e6
commit 3bd1c119eb
3 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import ConfigParser
class Config(object):
def __init__(self):
self.version = "0.3.1"
self.rev = 260
self.rev = 267
self.parser = self.createArguments()
argv = sys.argv[:] # Copy command line arguments
argv = self.parseConfig(argv) # Add arguments from config file

View File

@ -78,7 +78,8 @@ class FileServer(ConnectionServer):
message = re.sub("<.*?>", "", message.replace("<br>", " ").replace("&nbsp;", " ").strip()) # Strip http tags
except Exception, err:
message = "Error: %s" % Debug.formatException(err)
if "closed" in message:
data = ""
if "closed" in message or "Error" in message:
self.log.info("[BAD :(] Port closed: %s" % message)
if port == self.port:
self.port_opened = False # Self port, update port_opened status

View File

@ -404,7 +404,7 @@ def closeLibrary():
def getMessagePubkey(message, sig):
pkey = ssl.EC_KEY_new_by_curve_name(NID_secp256k1)
if not pkey.value:
if type(pkey) is not int and not pkey.value:
raise Exception(
"OpenSSL %s (%s) EC_KEY_new_by_curve_name failed: %s, probably your OpenSSL lib does not support secp256k1 elliptic curve. Please check: https://github.com/HelloZeroNet/ZeroNet/issues/132" %
(openssl_version, ssl._lib._name, pkey.value)