diff --git a/CHANGELOG.md b/CHANGELOG.md index 4faa0210..1ea65f82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Changelog -## 1.12.6 - 11/32/16 +## 1.12.6 - 12/02/16 * regression bugfix on timeout [#344](https://github.com/amoffat/sh/issues/344) +* regression bugfix on `_ok_code=None` ## 1.12.5 - 12/01/16 diff --git a/sh.py b/sh.py index 396cf2d6..4acd6e59 100644 --- a/sh.py +++ b/sh.py @@ -1186,6 +1186,13 @@ def __call__(self, *args, **kwargs): call_args.update(extracted_call_args) + # handle a None. this is added back only to not break the api in the + # 1.* version. TODO remove this in 2.0, as "ok_code", if specified, + # should always be a definitive value or list of values, and None is + # ambiguous + if call_args["ok_code"] is None: + call_args["ok_code"] = 0 + if not getattr(call_args["ok_code"], "__iter__", None): call_args["ok_code"] = [call_args["ok_code"]]