diff options
-rw-r--r-- | xserver.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xserver.py b/xserver.py index 5bc70cf65..30cde4751 100644 --- a/xserver.py +++ b/xserver.py @@ -82,7 +82,7 @@ def startX(): print "PCI probe for video cards failed. Falling back to", serverPath else: (device, driver, descr) = cards[0] - if driver[0:5] == "Card:": + if len (driver) > 5 and driver[0:5] == "Card:": card = findCardInDB (driver[5:]) if card.has_key ("SERVER"): serverPath = '/usr/X11R6/bin/XF86_' + card["SERVER"] @@ -91,9 +91,13 @@ def startX(): "Falling back to VGA16") serverPath = '/usr/X11R6/bin/XF86_VGA16' else: - if driver[0:7] == "Server:": + if len (driver) > 7 driver[0:7] == "Server:": serverPath = '/usr/X11R6/bin/XF86_' + driver[7:] + if not serverPath: + print "Unable to probe card. Falling back to VGA16" + serverPath = '/usr/X11R6/bin/XF86_VGA16' + isys.makeDevInode(mouseDev, "/tmp/" + mouseDev) f = open ('/tmp/XF86Config', 'w') |