qtile/qtile — pull request #466 by flacjacket (2014-08-03 02:43:21+00:00)
Title: Don't save `.previous_group` when deleting visible group

This fixes a problem I've been noticing on Travis, particularly with Python 3 tests. Since hash randomization is used, the iteration in https://github.com/qtile/qtile/blob/develop/test/test_manager.py#L258 is not always in the same order. I broke it down and found when the initial screen (`a`) is deleted, then the screen that is switched to (`dummygroup`) is deleted, it tries to switch back to the previous screen, but since `a` had been deleted, in throws an error. This fixes this error by not storing `.previous_group` in this case. The test, since it iterates using a list, would always fail in the current branch, but will pass with this change.