[modules/xrandr] Fix a crash caused by Python3

Python3 does not have sys.maxint anymore, so replace it with
sys.maxsize, which is available in both Python2 and Python3.

fixes #59
This commit is contained in:
Tobias Witek 2017-03-28 19:08:17 +02:00
parent 6ac6114b2e
commit f0bacdecd8

View file

@ -37,7 +37,7 @@ class Module(bumblebee.engine.Module):
self._engine.input.register_callback(widget, button=3, cmd=self._toggle)
new_widgets.append(widget)
widget.set("state", "on" if m else "off")
widget.set("pos", int(m.group(1)) if m else sys.maxint)
widget.set("pos", int(m.group(1)) if m else sys.maxsize)
while len(widgets) > 0:
del widgets[0]