Changeset 207

Show
Ignore:
Timestamp:
04/25/2008 11:31:42 AM (9 months ago)
Author:
funkiedamouse
Message:

Modified mw_acpi to work with the latest 2.6 kernel; now we accept both mW(h) and mA(h), and we don't expect /proc/acpi/info to exist.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property bzr:revision-id:v3-trunk0
      •  

        old new  
        33160 david.bronke@g33xnexus.com-20080421182909-b69ojuc5wfkeiiul 
        44161 david.bronke@g33xnexus.com-20080423004618-cialja7vve0p32xb 
         5162 david.bronke@g33xnexus.com-20080423005711-zxrgzogrymlz3j98 
    • Property bzr:revision-info
      •  

        old new  
        1 timestamp: 2008-04-22 20:46:18.157000065 -0400 
         1timestamp: 2008-04-22 20:57:11.611000061 -0400 
        22committer: David Bronke <David.Bronke@g33xnexus.com> 
        33properties:  
  • trunk/plwm/mw_acpi.py

    r201 r207  
    9292        REMAIN = 'remaining capacity' 
    9393 
    94         mW_re = re.compile(r'^(\d+) mW$') 
    95         mWh_re = re.compile(r'^(\d+) mWh$') 
     94        mW_re = re.compile(r'^(\d+) m[AW]$') 
     95        mWh_re = re.compile(r'^(\d+) m[AW]h$') 
    9696 
    9797        def __init__(self, id, path): 
     
    406406    # Interface functions below 
    407407    def probe(self): 
    408         if os.path.isfile('/proc/acpi/info'): 
     408        if os.path.isdir('/proc/acpi'): 
    409409            wmanager.debug('acpi', 'using Linux proc interface') 
    410410