"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Tardis/Config.py" between
Tardis-1.1.5.tar.gz and Tardis-1.2.1.tar.gz

About: Tardis is a system for making encrypted, incremental backups of filesystems.

Config.py  (Tardis-1.1.5):Config.py  (Tardis-1.2.1)
skipping to change at line 41 skipping to change at line 41
import sys import sys
import configparser import configparser
import Tardis.Defaults as Defaults import Tardis.Defaults as Defaults
import Tardis.Util as Util import Tardis.Util as Util
import Tardis.TardisCrypto as TardisCrypto import Tardis.TardisCrypto as TardisCrypto
configDefaults = { configDefaults = {
'Database': Defaults.getDefault('TARDIS_DB'), 'Database': Defaults.getDefault('TARDIS_DB'),
'Client': Defaults.getDefault('TARDIS_CLIENT'), 'Client': Defaults.getDefault('TARDIS_CLIENT'),
'DBDir': Defaults.getDefault('TARDIS_DBDIR'), 'DBDir': Defaults.getDefault('TARDIS_DBDIR'),
'DBName': Defaults.getDefault('TARDIS_DBNAME'), 'DBName': Defaults.getDefault('TARDIS_DBNAME'),
'Password': None, 'Password': None,
'PasswordFile': Defaults.getDefault('TARDIS_PWFILE'), 'PasswordFile': Defaults.getDefault('TARDIS_PWFILE'),
'PasswordProg': None, 'PasswordProg': None,
'PasswordTimeout': Defaults.getDefault('TARDIS_PWTIMEOUT'),
'Crypt': str(True), 'Crypt': str(True),
'KeyFile': Defaults.getDefault('TARDIS_KEYFILE'), 'KeyFile': Defaults.getDefault('TARDIS_KEYFILE'),
'LogFiles': None, 'LogFiles': None,
'Verbosity': str(0), 'Verbosity': str(0),
'Schema': Defaults.getDefault('TARDIS_SCHEMA') 'Schema': Defaults.getDefault('TARDIS_SCHEMA')
} }
config = configparser.ConfigParser(configDefaults, allow_no_value=True) config = configparser.ConfigParser(configDefaults, allow_no_value=True)
job = None job = None
def parseConfigOptions(parser): def parseConfigOptions(parser):
global job global job
configGroup = parser.add_argument_group("Configuration File Options") configGroup = parser.add_argument_group("Configuration File Options")
configGroup.add_argument('--config', dest='config', default=None, configGroup.add_argument('--config', dest='config', default=Defaults
help='Location of the configuration file. Def .getDefault('TARDIS_CONFIG'), help='Location of the configuration file. Def
ault: %(default)s') ault: %(default)s')
configGroup.add_argument('--job', dest='job', default='Tardis', configGroup.add_argument('--job', dest='job', default=Defaults.ge
help='Job Name within the configuration file. tDefault('TARDIS_JOB'), help='Job Name within the configuration file.
Default: %(default)s') Default: %(default)s')
(args, remaining) = parser.parse_known_args() (args, remaining) = parser.parse_known_args()
job = args.job job = args.job
if args.config: if args.config:
config.read(args.config) config.read(args.config)
if not config.has_section(job): if not config.has_section(job):
sys.stderr.write("WARNING: No Job named %s listed. Using defaults. Jobs available: %s\n" %(job, str(config.sections()).strip('[]'))) sys.stderr.write("WARNING: No Job named %s listed. Using defaults. Jobs available: %s\n" %(job, str(config.sections()).strip('[]')))
config.add_section(job) # Make it safe for readin g other values from. config.add_section(job) # Make it safe for readin g other values from.
else: else:
 End of changes. 4 change blocks. 
9 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)