X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fdunshire%2Ferrors.py;h=020186475b2a920f8425ffe0be76b3a27625de85;hb=23a5893ede3a22653128d3e7a66fb3f6b80616b8;hp=4e292acd5fe57258c9fe0c0f835476aca98ac53a;hpb=479cd91a21bb68b88021575741d812378971a7c9;p=dunshire.git diff --git a/src/dunshire/errors.py b/src/dunshire/errors.py index 4e292ac..0201864 100644 --- a/src/dunshire/errors.py +++ b/src/dunshire/errors.py @@ -70,7 +70,8 @@ class GameUnsolvableException(Exception): ... 'dual objective': 1.0, ... 'primal objective': None, ... 'gap': None, - ... 'residual as primal infeasibility certificate': 3.986246886102996e-09} + ... 'residual as primal infeasibility certificate': + ... 3.986246886102996e-09} >>> print(GameUnsolvableException(d)) Solution failed with result "primal infeasible." CVXOPT returned: @@ -117,5 +118,8 @@ class GameUnsolvableException(Exception): tpl = 'Solution failed with result "{:s}."\n' \ 'CVXOPT returned:\n {!s}' cvx_lines = _pretty_format_dict(self._solution_dict).splitlines() - cvx_str = '\n '.join(cvx_lines) # Indent the whole dict by two spaces. + + # Indent the whole dict by two spaces. + cvx_str = '\n '.join(cvx_lines) + return tpl.format(self._solution_dict['status'], cvx_str)