~rbirnie-deactivatedaccount/jockey/jockey-kde4

« back to all changes in this revision

Viewing changes to examples/handlers/nvidia.py

  • Committer: Martin Pitt
  • Date: 2008-04-28 08:05:11 UTC
  • Revision ID: martin.pitt@canonical.com-20080428080511-ttxb3iq73t0udq8k
nvidia.py: Fix "enabled" handling: check if the package is installed and module not blacklisted. (LP: #216650)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
import logging
6
6
 
7
 
from jockey.handlers import KernelModuleHandler
 
7
from jockey.handlers import KernelModuleHandler, ModulePackageHandler
8
8
from jockey.xorg_driver import XorgDriverHandler
9
9
from jockey.oslib import OSLib
10
10
 
50
50
        devices = self.xorg_conf.getSections('device') 
51
51
        if len(devices) == 0 or devices[0].driver != 'nvidia':
52
52
            return False
53
 
        return True
 
53
        return ModulePackageHandler.enabled(self)
54
54
 
55
55
    def enables_composite(self):
56
56
        '''Return whether this driver supports the composite extension.'''