Explorar el Código

tests: fix handling TestProcess.communicate(None)

Marek Marczykowski-Górecki hace 7 años
padre
commit
c435de06a1
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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