From ffc124376542c1fc46661e681cae3a62fec75536 Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Wed, 10 Sep 2014 11:52:02 -0700 Subject: [PATCH] handle None in string() call --- scripttest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripttest.py b/scripttest.py index d00247e..1c5d0d9 100644 --- a/scripttest.py +++ b/scripttest.py @@ -24,6 +24,9 @@ def clean_environ(e): def string(string): + if string is None: + # This function should always return a string and "None" is truthy. + return '' if sys.version_info >= (3,): if isinstance(string, str): return string @@ -207,6 +210,8 @@ def run(self, script, *args, **kw): ``quiet``: (default False) When there's an error (return code != 0), do not print stdout/stderr + ``debug``: (default False) + Print lots of information about the running subprocess Returns a `ProcResult `_ object.