Changeset 806


Ignore:
Timestamp:
03/08/11 21:39:16 (8 years ago)
Author:
aspidites
Message:

Patch by Aspidites:

  • added better default argument for data_dir instead of needing an else clause
  • TODO: write a proper command line interface and validate input
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/active/character_customization/game/parpg/settings.py

    r805 r806  
    407407""" 
    408408 
    409 def write_defaults(system=None, data_dir=None): 
     409def write_defaults(system=None, data_dir=""): 
    410410    #TODO: write defaults for Mac OS X 
    411411    if system is None: 
    412412        system = platform.system().lower() 
    413413 
    414     if data_dir is None: 
     414    if len(data_dir) == 0: 
    415415        if system == 'local': 
    416416            data_dir = os.path.join('.') 
     
    421421            data_dir = os.path.join(os.environ['PROGRAMFILES'], 
    422422                                    'PARPG') 
    423         else: 
    424             data_dir = "" 
    425423 
    426424    default_settings = DEFAULT_SETTINGS.split('\n') 
Note: See TracChangeset for help on using the changeset viewer.