From f0bacdecd84386ab04ae895f0731431090f93c03 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Tue, 28 Mar 2017 19:08:17 +0200 Subject: [PATCH] [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 --- bumblebee/modules/xrandr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee/modules/xrandr.py b/bumblebee/modules/xrandr.py index e362e97..a1db224 100644 --- a/bumblebee/modules/xrandr.py +++ b/bumblebee/modules/xrandr.py @@ -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]