|
@@ -62,7 +62,7 @@ class Host(Thread):
|
|
|
|
|
|
def sshcommand(self, command):
|
|
|
if self.up:
|
|
|
- ssh = subprocess.Popen( ["ssh", "%s" % self.hostname, command], shell = False, stdout = subprocess.PIPE, stderr = subprocess.PIPE )
|
|
|
+ ssh = subprocess.Popen( ["ssh", "%s" % self.hostname, command], shell = False, stdout = subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines=True)
|
|
|
return ssh
|
|
|
else:
|
|
|
print(self.hostname + ' is not up.')
|
|
@@ -71,7 +71,7 @@ class Host(Thread):
|
|
|
def status(self):
|
|
|
statuscmd = "ps aux | grep 'xfreerdp' | grep -v grep"
|
|
|
ssh = self.sshcommand(statuscmd)
|
|
|
- result = [ l for l in ssh.stdout.readlines() if b'/usr/bin/xfreerdp /cert-ignore /f /v:tolab.fisica.unimi.it' in l ]
|
|
|
+ result = [ l for l in ssh.stdout.readlines() if '/usr/bin/xfreerdp /cert-ignore /f /v:tolab.fisica.unimi.it' in l ]
|
|
|
|
|
|
if result == []:
|
|
|
return False
|