home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / checkbox / registries / dpkg.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  1.1 KB  |  25 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import re
  5. from checkbox.properties import String
  6. from checkbox.registries.command import CommandRegistry
  7.  
  8. class DpkgRegistry(CommandRegistry):
  9.     '''Registry for dpkg information.
  10.  
  11.     For the moment, this registry only contains items for the version
  12.     and architecture as returned by the dpkg command.
  13.     '''
  14.     command = String(default = 'dpkg --version')
  15.     
  16.     def items(self):
  17.         items = []
  18.         match = re.search('([\\d\\.]+) \\((.*)\\)', str(self))
  19.         items.append(('version', match.group(1)))
  20.         items.append(('architecture', match.group(2)))
  21.         return items
  22.  
  23.  
  24. factory = DpkgRegistry
  25.