Rev267, Hotfix for problems caused by changes in rev260, Fix unhandled exception on failed port checking
This commit is contained in:
parent
0ca0c754e6
commit
3bd1c119eb
3 changed files with 4 additions and 3 deletions
|
@ -4,7 +4,7 @@ import ConfigParser
|
||||||
class Config(object):
|
class Config(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.version = "0.3.1"
|
self.version = "0.3.1"
|
||||||
self.rev = 260
|
self.rev = 267
|
||||||
self.parser = self.createArguments()
|
self.parser = self.createArguments()
|
||||||
argv = sys.argv[:] # Copy command line arguments
|
argv = sys.argv[:] # Copy command line arguments
|
||||||
argv = self.parseConfig(argv) # Add arguments from config file
|
argv = self.parseConfig(argv) # Add arguments from config file
|
||||||
|
|
|
@ -78,7 +78,8 @@ class FileServer(ConnectionServer):
|
||||||
message = re.sub("<.*?>", "", message.replace("<br>", " ").replace(" ", " ").strip()) # Strip http tags
|
message = re.sub("<.*?>", "", message.replace("<br>", " ").replace(" ", " ").strip()) # Strip http tags
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
message = "Error: %s" % Debug.formatException(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)
|
self.log.info("[BAD :(] Port closed: %s" % message)
|
||||||
if port == self.port:
|
if port == self.port:
|
||||||
self.port_opened = False # Self port, update port_opened status
|
self.port_opened = False # Self port, update port_opened status
|
||||||
|
|
|
@ -404,7 +404,7 @@ def closeLibrary():
|
||||||
|
|
||||||
def getMessagePubkey(message, sig):
|
def getMessagePubkey(message, sig):
|
||||||
pkey = ssl.EC_KEY_new_by_curve_name(NID_secp256k1)
|
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(
|
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 %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)
|
(openssl_version, ssl._lib._name, pkey.value)
|
||||||
|
|
Loading…
Reference in a new issue