Minor changes to logging, variable name

This commit is contained in:
Stevan Pettit 2012-06-10 15:53:46 -04:00
parent 8365d6f589
commit c306573309
2 changed files with 6 additions and 6 deletions

View File

@ -268,13 +268,13 @@ def main(args=None):
portable_settings_file = os.path.abspath(os.path.join(app_path, u'..', portable_settings_file = os.path.abspath(os.path.join(app_path, u'..',
u'..', u'Data', u'OpenLP.ini')) u'..', u'Data', u'OpenLP.ini'))
# Make this our settings file # Make this our settings file
log.info(u'INI file: %s' % portable_settings_file) log.info(u'INI file: %s', portable_settings_file)
Settings.setFilename(portable_settings_file) Settings.setFilename(portable_settings_file)
portable_settings = Settings() portable_settings = Settings()
# Set our data path # Set our data path
data_path = os.path.abspath(os.path.join(app_path, data_path = os.path.abspath(os.path.join(app_path,
u'..', u'..', u'Data',)) u'..', u'..', u'Data',))
log.info(u'Data path: %s' % data_path) log.info(u'Data path: %s', data_path)
# Point to our data path # Point to our data path
portable_settings.setValue(u'advanced/data path', data_path) portable_settings.setValue(u'advanced/data path', data_path)
portable_settings.setValue(u'advanced/is portable', True) portable_settings.setValue(u'advanced/is portable', True)

View File

@ -46,7 +46,7 @@ class Settings(QtCore.QSettings):
object for accessing settings stored in that Ini file. object for accessing settings stored in that Ini file.
""" """
filePath = u'' __filePath = u''
@staticmethod @staticmethod
def setFilename(iniFile): def setFilename(iniFile):
@ -55,12 +55,12 @@ class Settings(QtCore.QSettings):
Does not affect existing Settings objects. Does not affect existing Settings objects.
""" """
Settings.filePath = iniFile Settings.__filePath = iniFile
def __init__(self, *args): def __init__(self, *args):
if not args and Settings.filePath and (Settings.defaultFormat() == if not args and Settings.__filePath and (Settings.defaultFormat() ==
Settings.IniFormat): Settings.IniFormat):
QtCore.QSettings.__init__(self, Settings.filePath, QtCore.QSettings.__init__(self, Settings.__filePath,
Settings.IniFormat) Settings.IniFormat)
else: else:
QtCore.QSettings.__init__(self, *args) QtCore.QSettings.__init__(self, *args)