diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-11 11:05:33 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-11 11:05:33 (GMT) |
commit | 628271959c97c49b64ed16203a5d8a2d0202ede7 (patch) | |
tree | 33e1e34f6d619d6fa7cf1c47da67d587e13194e4 /shell/session | |
parent | cb47f17b31dde57823d46d974e983aa7fe7cad98 (diff) |
Refactor the console stuff
Diffstat (limited to 'shell/session')
-rw-r--r-- | shell/session/Emulator.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/shell/session/Emulator.py b/shell/session/Emulator.py index d70059d..4928ec4 100644 --- a/shell/session/Emulator.py +++ b/shell/session/Emulator.py @@ -1,4 +1,3 @@ -import logging import os import socket import sys @@ -9,8 +8,8 @@ def get_display_number(): """Find a free display number trying to connect to 6000+ ports""" retries = 20 display_number = 1 - display_is_free = False - + display_is_free = False + while not display_is_free and retries > 0: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: @@ -57,10 +56,6 @@ class XnestProcess(Process): class Emulator: """The OLPC emulator""" - - def __init__(self): - pass - def start(self): try: process = XephyrProcess() @@ -70,6 +65,6 @@ class Emulator: process = XnestProcess() process.start() except: - logging.error('Cannot run the emulator. You need to install \ - Xephyr or Xnest.') + print('Cannot run the emulator. You need to install\ + Xephyr or Xnest.') sys.exit(0) |