summaryrefslogtreecommitdiff
path: root/urwid/raw_display.py
diff options
context:
space:
mode:
Diffstat (limited to 'urwid/raw_display.py')
-rw-r--r--urwid/raw_display.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/urwid/raw_display.py b/urwid/raw_display.py
index 1b06862..23c00d7 100644
--- a/urwid/raw_display.py
+++ b/urwid/raw_display.py
@@ -209,10 +209,9 @@ class Screen(BaseScreen, RealTerminal):
def _start_gpm_tracking(self):
if not os.path.isfile("/usr/bin/mev"):
return
- if not os.environ.get('TERM',"").lower().startswith("linux"):
- return
- if not Popen:
+ if not os.environ.get('TERM', "").lower().startswith("linux"):
return
+
m = Popen(["/usr/bin/mev", "-e", "158"], stdin=PIPE, stdout=PIPE, close_fds=True, encoding="ascii")
fcntl.fcntl(m.stdout.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
self.gpm_mev = m