Skip to content

Commit

Permalink
Strip whitespace during shell logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Feb 27, 2015
1 parent e102044 commit 2d4b998
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

0.1.3 (2014/02/27)
------------------

- Strip whitespace during shell logging.

0.1.2 (2014/02/27)
------------------

Expand Down
2 changes: 1 addition & 1 deletion gdm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

__project__ = 'GDM'
__version__ = '0.1.2'
__version__ = '0.1.3'

CLI = 'gdm'
VERSION = __project__ + '-' + __version__
Expand Down
4 changes: 3 additions & 1 deletion gdm/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2d4b998

Please sign in to comment.