From 14625c6ed115af2206e379bc92ad2adf96f6cff9 Mon Sep 17 00:00:00 2001 From: Sebastian Koslowski <koslowski@kit.edu> Date: Wed, 9 Apr 2014 17:41:52 +0200 Subject: grc: nicer output of blocks paths and prefs file --- grc/gui/Preferences.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'grc/gui/Preferences.py') diff --git a/grc/gui/Preferences.py b/grc/gui/Preferences.py index 061bda9c05..b15fb9738b 100644 --- a/grc/gui/Preferences.py +++ b/grc/gui/Preferences.py @@ -24,7 +24,6 @@ _platform = None _config_parser = ConfigParser.ConfigParser() def file_extension(): return '.'+_platform.get_key() -def _prefs_file(): return os.environ.get('GRC_PREFS_PATH', os.path.join(os.path.expanduser('~'), file_extension())) def load(platform): global _platform @@ -32,12 +31,10 @@ def load(platform): #create sections _config_parser.add_section('main') _config_parser.add_section('files_open') - print "Reading preferences from:", _prefs_file() - try: _config_parser.read(_prefs_file()) + try: _config_parser.read(_platform.get_prefs_file()) except: pass def save(): - print "Writing preferences to:", _prefs_file() - try: _config_parser.write(open(_prefs_file(), 'w')) + try: _config_parser.write(open(_platform.get_prefs_file(), 'w')) except: pass ########################################################################### -- cgit v1.2.3