V0.6 #852
|
@ -11,6 +11,7 @@ try:
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from PyQt4.QtCore import *
|
from PyQt4.QtCore import *
|
||||||
from PyQt4.QtGui import *
|
from PyQt4.QtGui import *
|
||||||
|
from PyQt4.QtNetwork import QLocalSocket, QLocalServer
|
||||||
|
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
logmsg = 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\' (without quotes).'
|
logmsg = 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\' (without quotes).'
|
||||||
|
|
|
@ -71,6 +71,7 @@ class Router:
|
||||||
import urllib2
|
import urllib2
|
||||||
from xml.dom.minidom import parseString
|
from xml.dom.minidom import parseString
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
from debug import logger
|
||||||
|
|
||||||
self.address = address
|
self.address = address
|
||||||
|
|
||||||
|
@ -81,7 +82,12 @@ class Router:
|
||||||
if len(part) == 2:
|
if len(part) == 2:
|
||||||
header[part[0].lower()] = part[1]
|
header[part[0].lower()] = part[1]
|
||||||
|
|
||||||
self.routerPath = urlparse(header['location'])
|
try:
|
||||||
|
self.routerPath = urlparse(header['location'])
|
||||||
|
if not self.routerPath or not hasattr(self.routerPath, "hostname"):
|
||||||
|
logger.error ("UPnP: no hostname: %s", header['location'])
|
||||||
|
except KeyError:
|
||||||
|
logger.error ("UPnP: missing location header")
|
||||||
|
|
||||||
# get the profile xml file and read it into a variable
|
# get the profile xml file and read it into a variable
|
||||||
directory = urllib2.urlopen(header['location']).read()
|
directory = urllib2.urlopen(header['location']).read()
|
||||||
|
|
Reference in New Issue
Block a user