Changeset 170 for trunk/src


Ignore:
Timestamp:
08/19/09 10:13:06 (15 years ago)
Author:
bas
Message:

pxe_global.py:

  • moved some more functions to the library the exception Class

src/pxeconfigd.py:

  • just import the server side as module
Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/pxe_global.py.in

    r168 r170  
    1010import os
    1111import ConfigParser
     12
     13class PxeConfig(Exception):
     14       def __init__(self, msg=''):
     15               self.msg = msg
     16               Exception.__init__(self, msg)
     17
     18       def __repr__(self):
     19               return self.msg
    1220
    1321def ReadConfig():
  • trunk/src/pxeconfig.in

    r161 r170  
    3535        import pxeconfig
    3636
     37from pxe_global import *
     38
    3739if __name__ == '__main__':
    3840        try:
  • trunk/src/pxeconfig.py

    r168 r170  
    7272END          = 'end'
    7373VERSION      = '3.1.0'
    74 
    75 class PxeConfig(Exception):
    76         def __init__(self, msg=''):
    77                 self.msg = msg
    78                 Exception.__init__(self, msg)
    79 
    80         def __repr__(self):
    81                 return self.msg
    82 
    83 #def ReadConfig(file):
    84 #       """
    85 #       Parse the config file
    86 #       """
    87 #       if not os.path.isfile(file):
    88 #               error = 'File %s does not exist' %file
    89 #               raise PxeConfig, error
    90 #
    91 ##      config = ConfigParser.RawConfigParser()
    92 #       try:
    93 #               config.read(file)
    94 #       except ConfigParser.MissingSectionHeaderError,detail:
    95 #               raise PxeConfig, detail
    96 #
    97 #       # Not yet uses
    98 #       #
    99 #       #projects = {}
    100 #       #for section in config.sections():
    101 ##      #       projects[section] = {}
    102 #       #       for option in  config.options(section):
    103 #       #       projects[section][option] = config.get(section, option)
    104 #
    105 #       stanza = config.defaults()
    106 #       return stanza
    107 #
    10874
    10975def select_pxe_configfile():
Note: See TracChangeset for help on using the changeset viewer.