qtile/qtile — pull request #409 by blotus (2014-04-15 13:19:01+00:00)
Title: Fix battery widget when battery status cannot be read

Currently the battery widget will display 'Full' if it is not able to get the status of the battery (for example, if it tries to read the wrong file in sysfs).
The code was already trying to handle this case, by casting 0 to a float, and catching TypeError but casting an int to a float does not raise an exception.
This patch makes _get_info() returns None in case of error, allowing the widget to display an error message.