Patch for an Issue #454

This commit is contained in:
stamparm 2013-05-29 15:26:11 +02:00
parent 60df3e9d1e
commit dfd6ee20bb

View File

@ -1072,7 +1072,7 @@ def parseTargetDirect():
if details.group('remote'):
remote = True
conf.hostname = details.group('hostname')
conf.hostname = details.group('hostname').strip()
conf.port = int(details.group('port'))
else:
conf.hostname = "localhost"
@ -1348,7 +1348,14 @@ def getLocalIP():
return retVal
def getRemoteIP():
return socket.gethostbyname(conf.hostname)
retVal = None
try:
retVal = socket.gethostbyname(conf.hostname)
except socket.gaierror:
errMsg = "address resolution problem "
errMsg += "occurred for hostname '%s'" % conf.hostname
singleTimeLogMessage(errMsg, logging.ERROR)
return retVal
def getFileType(filePath):
try: