[damned-lies] Fixed conditional test in run_shell_command
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Fixed conditional test in run_shell_command
- Date: Fri, 24 Oct 2014 17:22:02 +0000 (UTC)
commit 1c53313f7e5025066c333e3849d1aae08f75b3cc
Author: Claude Paroz <claude 2xlibre net>
Date: Fri Oct 24 19:05:49 2014 +0200
Fixed conditional test in run_shell_command
stats/utils.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index 49658d0..c5d3022 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -127,7 +127,7 @@ def run_shell_command(cmd, input_data=None, raise_on_error=False, **popen_kwargs
stdin = None
if input_data:
stdin = PIPE
- if 'env' in popen_kwargs:
+ if popen_kwargs.get('env'):
os.environ.update(popen_kwargs['env'])
popen_kwargs['env'] = os.environ
shell = not isinstance(cmd, list)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]