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

@ -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