pep related fixes

This commit is contained in:
Adolfo Gómez García 2018-04-18 00:44:21 +02:00
parent 62abc85191
commit f74b0b0fe9
5 changed files with 6 additions and 6 deletions

View File

@ -601,7 +601,7 @@ class UserServiceManager(object):
if doTest is False:
# traceLogger.info('GOT service "{}" for user "{}" with transport "{}" (NOT TESTED)'.format(userService.name, userName, trans.name))
return (None, userService, None, trans, None)
return None, userService, None, trans, None
serviceNotReadyCode = 0x0001
ip = 'unknown'
@ -628,7 +628,7 @@ class UserServiceManager(object):
log.doLog(userService, log.INFO, "User service ready", log.WEB)
self.notifyPreconnect(userService, itrans.processedUser(userService, user), itrans.protocol)
traceLogger.info('READY on service "{}" for user "{}" with transport "{}" (ip:{})'.format(userService.name, userName, trans.name, ip))
return (ip, userService, iads, trans, itrans)
return ip, userService, iads, trans, itrans
else:
message = itrans.getCustomAvailableErrorMsg(userService, ip)
log.doLog(userService, log.WARN, message, log.TRANSPORT)

View File

@ -52,7 +52,7 @@ Unknown = 'Unknown'
knownOss = (WindowsPhone, Android, Linux, Windows, Macintosh, iPad, iPhone, ChromeOS) # Android is linux also, so it is cheched on first place
allOss = (knownOss) + (Unknown,)
allOss = knownOss + (Unknown,)
desktopOss = (Linux, Windows, Macintosh)
mobilesODD = list(set(allOss) - set(desktopOss))

View File

@ -202,7 +202,7 @@ def getNetInfo(api, machineId, networkId=None):
except Exception:
ip = ''
return (node.getElementsByTagName('MAC')[0].childNodes[0].data, ip)
return node.getElementsByTagName('MAC')[0].childNodes[0].data, ip
except Exception:
raise Exception('No network interface found on template. Please, add a network and republish.')

View File

@ -333,7 +333,7 @@ class LiveService(Service):
"""
net = self.api.getServer(machineId)['addresses']
vals = six.next(six.itervalues(net))[0] # Returns "any" mac address of any interface. We just need only one interface info
return (vals['OS-EXT-IPS-MAC:mac_addr'].upper(), vals['addr'])
return vals['OS-EXT-IPS-MAC:mac_addr'].upper(), vals['addr']
def getBaseName(self):
"""

View File

@ -231,7 +231,7 @@ class BaseX2GOTransport(Transport):
priv = privFile.getvalue()
pub = key.get_base64() # 'ssh-rsa {} UDS@X2GOCLIENT'.format(key.get_base64())
return (priv, pub)
return priv, pub
def getAuthorizeScript(self, user, pubKey):
return self.getScript('scripts/authorize.py').replace('__USER__', user).replace('__KEY__', pubKey)