From 2d4b9983ec046a89d058f658929e813c0878917b Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Fri, 27 Feb 2015 17:12:49 -0500 Subject: [PATCH] Strip whitespace during shell logging --- CHANGES.md | 5 +++++ gdm/__init__.py | 2 +- gdm/shell.py | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3bf56a4e..7d0a9bd0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ Changelog ========= +0.1.3 (2014/02/27) +------------------ + +- Strip whitespace during shell logging. + 0.1.2 (2014/02/27) ------------------ diff --git a/gdm/__init__.py b/gdm/__init__.py index 67018d64..806e0e51 100644 --- a/gdm/__init__.py +++ b/gdm/__init__.py @@ -3,7 +3,7 @@ import sys __project__ = 'GDM' -__version__ = '0.1.2' +__version__ = '0.1.3' CLI = 'gdm' VERSION = __project__ + '-' + __version__ diff --git a/gdm/shell.py b/gdm/shell.py index 2fe18083..f344070f 100644 --- a/gdm/shell.py +++ b/gdm/shell.py @@ -21,7 +21,9 @@ def _call(name, *args, catch=True): else: try: program = Command(name) - program(*args, _err=log.debug, _out=log.debug) + program(*args, + _err=lambda line: log.debug(line.strip()), + _out=lambda line: log.debug(line.strip())) except ErrorReturnCode as exc: msg = "\n IN: '{}'{}".format(os.getcwd(), exc) if catch: