{"action":"created","issue":{"url":"https://api.github.com/repos/Frozenball/pytest-sugar/issues/80","repository_url":"https://api.github.com/repos/Frozenball/pytest-sugar","labels_url":"https://api.github.com/repos/Frozenball/pytest-sugar/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/Frozenball/pytest-sugar/issues/80/comments","events_url":"https://api.github.com/repos/Frozenball/pytest-sugar/issues/80/events","html_url":"https://github.com/Frozenball/pytest-sugar/issues/80","id":142061589,"number":80,"title":"UnboundLocalError when used together with pytest-rerunfailures","user":{"login":"icemac","id":386619,"avatar_url":"https://avatars.githubusercontent.com/u/386619?v=3","gravatar_id":"","url":"https://api.github.com/users/icemac","html_url":"https://github.com/icemac","followers_url":"https://api.github.com/users/icemac/followers","following_url":"https://api.github.com/users/icemac/following{/other_user}","gists_url":"https://api.github.com/users/icemac/gists{/gist_id}","starred_url":"https://api.github.com/users/icemac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icemac/subscriptions","organizations_url":"https://api.github.com/users/icemac/orgs","repos_url":"https://api.github.com/users/icemac/repos","events_url":"https://api.github.com/users/icemac/events{/privacy}","received_events_url":"https://api.github.com/users/icemac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-19T13:27:54Z","updated_at":"2016-03-19T14:39:25Z","closed_at":null,"body":"I am using pytest-sugar together with pytest-rerunfailures (version 1.0.1) and marked a test using `@pytest.mark.flaky(reruns=3)`. When this test ist run again because it failed I get the following internal error:\r\n\r\n```\r\nINTERNALERROR> Traceback (most recent call last):\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/main.py\", line 84, in wrap_session\r\nINTERNALERROR>     doit(config, session)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/main.py\", line 122, in _main\r\nINTERNALERROR>     config.hook.pytest_runtestloop(session=session)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 521, in __call__\r\nINTERNALERROR>     return self._docall(self.methods, kwargs)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 528, in _docall\r\nINTERNALERROR>     firstresult=self.firstresult).execute()\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 394, in execute\r\nINTERNALERROR>     res = method(*args)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/main.py\", line 142, in pytest_runtestloop\r\nINTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 521, in __call__\r\nINTERNALERROR>     return self._docall(self.methods, kwargs)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 528, in _docall\r\nINTERNALERROR>     firstresult=self.firstresult).execute()\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 393, in execute\r\nINTERNALERROR>     return wrapped_call(method(*args), self.execute)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 113, in wrapped_call\r\nINTERNALERROR>     return call_outcome.get_result()\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 138, in get_result\r\nINTERNALERROR>     py.builtin._reraise(*ex)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 123, in __init__\r\nINTERNALERROR>     self.result = func()\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 394, in execute\r\nINTERNALERROR>     res = method(*args)\r\nINTERNALERROR>   File \"build/bdist.macosx-10.11-x86_64/egg/pytest_rerunfailures.py\", line 86, in pytest_runtest_protocol\r\nINTERNALERROR>     item.ihook.pytest_runtest_logreport(report=report)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 521, in __call__\r\nINTERNALERROR>     return self._docall(self.methods, kwargs)\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 528, in _docall\r\nINTERNALERROR>     firstresult=self.firstresult).execute()\r\nINTERNALERROR>   File \".../pytest-2.7.3-py2.7.egg/_pytest/core.py\", line 394, in execute\r\nINTERNALERROR>     res = method(*args)\r\nINTERNALERROR>   File \".../pytest_sugar-0.6.0-py2.7.egg/pytest_sugar.py\", line 353, in pytest_runtest_logreport\r\nINTERNALERROR>     res = pytest_report_teststatus(report=report)\r\nINTERNALERROR>   File \".../pytest_sugar-0.6.0-py2.7.egg/pytest_sugar.py\", line 166, in pytest_report_teststatus\r\nINTERNALERROR>     return report.outcome, letter, report.outcome.upper()\r\nINTERNALERROR> UnboundLocalError: local variable 'letter' referenced before assignment\r\n```"},"comment":{"url":"https://api.github.com/repos/Frozenball/pytest-sugar/issues/comments/198714055","html_url":"https://github.com/Frozenball/pytest-sugar/issues/80#issuecomment-198714055","issue_url":"https://api.github.com/repos/Frozenball/pytest-sugar/issues/80","id":198714055,"user":{"login":"Frozenball","id":53298,"avatar_url":"https://avatars.githubusercontent.com/u/53298?v=3","gravatar_id":"","url":"https://api.github.com/users/Frozenball","html_url":"https://github.com/Frozenball","followers_url":"https://api.github.com/users/Frozenball/followers","following_url":"https://api.github.com/users/Frozenball/following{/other_user}","gists_url":"https://api.github.com/users/Frozenball/gists{/gist_id}","starred_url":"https://api.github.com/users/Frozenball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frozenball/subscriptions","organizations_url":"https://api.github.com/users/Frozenball/orgs","repos_url":"https://api.github.com/users/Frozenball/repos","events_url":"https://api.github.com/users/Frozenball/events{/privacy}","received_events_url":"https://api.github.com/users/Frozenball/received_events","type":"User","site_admin":false},"created_at":"2016-03-19T14:39:25Z","updated_at":"2016-03-19T14:39:25Z","body":"Thanks for the bug report, I have fixed this for the next release."}}