Browse Source

Merge branch 'python3'

Matteo Bonamassa 8 months ago
parent
commit
c4b222a070
1 changed files with 2 additions and 2 deletions
  1. 2 2
      xfreerdpctl

+ 2 - 2
xfreerdpctl

@@ -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