[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:
parent
6ac6114b2e
commit
f0bacdecd8
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class Module(bumblebee.engine.Module):
|
||||||
self._engine.input.register_callback(widget, button=3, cmd=self._toggle)
|
self._engine.input.register_callback(widget, button=3, cmd=self._toggle)
|
||||||
new_widgets.append(widget)
|
new_widgets.append(widget)
|
||||||
widget.set("state", "on" if m else "off")
|
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:
|
while len(widgets) > 0:
|
||||||
del widgets[0]
|
del widgets[0]
|
||||||
|
|
Loading…
Reference in a new issue