Selaa lähdekoodia

tests: fix handling TestProcess.communicate(None)

Marek Marczykowski-Górecki 7 vuotta sitten
vanhempi
commit
c435de06a1
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      qubesadmin/tests/__init__.py

+ 2 - 1
qubesadmin/tests/__init__.py

@@ -65,7 +65,8 @@ class TestProcess(object):
         self.returncode = 0
 
     def communicate(self, input=None):
-        self.stdin.write(input)
+        if input is not None:
+            self.stdin.write(input)
         self.stdin.close()
         self.stdin_close()
         return self.stdout, self.stderr