eric7/Preferences/__init__.py

branch
eric7
changeset 8977
663521af48b2
parent 8973
ad4848b7fd9b
child 8981
fa03fe1fd672
--- a/eric7/Preferences/__init__.py	Sun Mar 13 15:20:26 2022 +0100
+++ b/eric7/Preferences/__init__.py	Sun Mar 13 19:59:03 2022 +0100
@@ -1434,6 +1434,12 @@
         "PipSearchIndex": "",               # used by the search command
         "ExcludeCondaEnvironments": True,
         # don't show conda environments in selector
+        
+        # defaults for the package vulnerability check
+        "VulnerabilityDbMirror":
+            "https://raw.githubusercontent.com/pyupio/safety-db/master/data/",
+        "VulnerabilityDbCacheValidity": 60 * 60 * 6     # 6 hours
+        # TODO: make these entries configurable
     }
     
     # defaults for MicroPython
@@ -3440,10 +3446,14 @@
     @param key the key of the value to get
     @return the requested pip value
     """
-    if key in ("ExcludeCondaEnvironments"):
+    if key in ("ExcludeCondaEnvironments",):
         return toBool(Prefs.settings.value(
             "Pip/" + key,
             Prefs.pipDefaults[key]))
+    elif key in ("VulnerabilityDbCacheValidity",):
+        return int(Prefs.settings.value(
+            "Pip/" + key,
+            Prefs.pipDefaults[key]))
     else:
         return Prefs.settings.value(
             "Pip/" + key,

eric ide

mercurial