[Xfce4-commits] [apps/catfish] 01/01: Handle exceptions encountered while opening settings (bug #14491)

noreply at xfce.org noreply at xfce.org
Sat Jun 30 05:08:43 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/catfish.

commit 741e4c56d9e88a0a81e681a1e7d3d23bb200cac4
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Fri Jun 29 23:08:36 2018 -0400

    Handle exceptions encountered while opening settings (bug #14491)
---
 catfish_lib/CatfishSettings.py | 23 +++++++++++++----------
 po/catfish.pot                 |  2 +-
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/catfish_lib/CatfishSettings.py b/catfish_lib/CatfishSettings.py
index 7406a8a..597c929 100644
--- a/catfish_lib/CatfishSettings.py
+++ b/catfish_lib/CatfishSettings.py
@@ -60,16 +60,19 @@ class CatfishSettings:
         """Read the settings rc-file into this settings instance."""
         self.settings = default_settings.copy()
         if os.path.isfile(self.settings_file):
-            for line in open(self.settings_file):
-                if not line.startswith('#'):
-                    try:
-                        prop, value = line.split('=')
-                        if prop in self.settings:
-                            if value.strip().lower() in ['true', 'false']:
-                                value = value.strip().lower() == 'true'
-                            self.settings[prop] = value
-                    except Exception:
-                        pass
+            try:
+                for line in open(self.settings_file):
+                    if not line.startswith('#'):
+                        try:
+                            prop, value = line.split('=')
+                            if prop in self.settings:
+                                if value.strip().lower() in ['true', 'false']:
+                                    value = value.strip().lower() == 'true'
+                                self.settings[prop] = value
+                        except Exception:
+                            pass
+            except Exception:
+                pass
 
     def write(self):
         """Write the current settings to the settings rc-file."""
diff --git a/po/catfish.pot b/po/catfish.pot
index 9e61816..be51d44 100644
--- a/po/catfish.pot
+++ b/po/catfish.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-06-29 22:53-0400\n"
+"POT-Creation-Date: 2018-06-29 23:08-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list