Preferences/__init__.py

changeset 6522
20c9a023b6c1
parent 6424
5e74c4e22e9a
child 6525
ca6d66fee883
child 6537
61a8d416dd34
diff -r a920f2ca8f5f -r 20c9a023b6c1 Preferences/__init__.py
--- a/Preferences/__init__.py	Sun Sep 30 20:01:12 2018 +0300
+++ b/Preferences/__init__.py	Tue Oct 02 19:11:39 2018 +0200
@@ -3287,8 +3287,11 @@
         return pwConvert(prefClass.settings.value(
             "User/" + key, prefClass.userDefaults[key]), encode=False)
     elif key in ["MailServerPort"]:
-        return int(prefClass.settings.value(
-            "User/" + key, prefClass.userDefaults[key]))
+        try:
+            return int(prefClass.settings.value(
+                "User/" + key, prefClass.userDefaults[key]))
+        except ValueError:
+            return prefClass.userDefaults[key]
     elif key in ["MailServerAuthentication", "UseSystemEmailClient",
                  "UseMasterPassword", "SavePasswords", "UseGoogleMailOAuth2"]:
         return toBool(prefClass.settings.value(

eric ide

mercurial