Skip to content

Commit aabf600

Browse files
committed
Fix incorrectly resolved merge conflicts
Two file merge conflicts, __init__.py and upnp.py, were not resolved correctly by the automatic resolving (probably because the affected code was written by other people and I merged them into mailchuck fork). This changes it to the same code that is in the mailchuck fork)
1 parent 0851b75 commit aabf600

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/bitmessageqt/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from PyQt4 import QtCore, QtGui
1212
from PyQt4.QtCore import *
1313
from PyQt4.QtGui import *
14+
from PyQt4.QtNetwork import QLocalSocket, QLocalServer
1415

1516
except Exception as err:
1617
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).'

src/upnp.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def __init__(self, ssdpResponse, address):
7171
import urllib2
7272
from xml.dom.minidom import parseString
7373
from urlparse import urlparse
74+
from debug import logger
7475

7576
self.address = address
7677

@@ -81,7 +82,12 @@ def __init__(self, ssdpResponse, address):
8182
if len(part) == 2:
8283
header[part[0].lower()] = part[1]
8384

84-
self.routerPath = urlparse(header['location'])
85+
try:
86+
self.routerPath = urlparse(header['location'])
87+
if not self.routerPath or not hasattr(self.routerPath, "hostname"):
88+
logger.error ("UPnP: no hostname: %s", header['location'])
89+
except KeyError:
90+
logger.error ("UPnP: missing location header")
8591

8692
# get the profile xml file and read it into a variable
8793
directory = urllib2.urlopen(header['location']).read()

0 commit comments

Comments
 (0)