diff options
Diffstat (limited to 'libbe/util/subproc.py')
-rw-r--r-- | libbe/util/subproc.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbe/util/subproc.py b/libbe/util/subproc.py index 5412b08..912433f 100644 --- a/libbe/util/subproc.py +++ b/libbe/util/subproc.py @@ -54,7 +54,7 @@ def invoke(args, stdin=None, stdout=PIPE, stderr=PIPE, expect=(0,), unicode_output == True, convert stdout and stdin strings to unicode before returing them. """ - if cwd == None: + if cwd is None: cwd = '.' if isinstance(shell, (str,)): list_args = ' '.split(args) # sloppy, but just for logging @@ -81,11 +81,11 @@ def invoke(args, stdin=None, stdout=PIPE, stderr=PIPE, expect=(0,), stdout,stderr = q.communicate(input=stdin) status = q.wait() if unicode_output == True: - if encoding == None: + if encoding is None: encoding = get_encoding() - if stdout != None: + if stdout is not None: stdout = str(stdout, encoding) - if stderr != None: + if stderr is not None: stderr = str(stderr, encoding) libbe.LOG.debug('{0}\n{1}{2}'.format(status, stdout, stderr)) else: |