Changeset 283 for trunk/game/settings.py


Ignore:
Timestamp:
09/16/09 02:18:07 (10 years ago)
Author:
orlandov
Message:

Ticket #96: Patch by amo-ej1 (with addition from or1andov) fixes[s:trac, t:96]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/settings.py

    r147 r283  
    2929        self.changesRequireRestart = True 
    3030 
    31     def readSetting(self, name, type='int', strip=True, text=False): 
     31    def readSetting(self, name, type='int', strip=True, text=False, default=None): 
    3232        if not hasattr(self, 'tree'): 
    3333            self.tree = ET.parse('settings.xml') 
     
    6060            print 'Setting,', name, 'does not exist!' 
    6161 
     62        return default 
     63 
    6264    def setSetting(self, name, value): 
    6365        element = self.root_element.find(name) 
Note: See TracChangeset for help on using the changeset viewer.