src/eric7/Project/Project.py

branch
eric7
changeset 9925
a267ac36dd69
parent 9786
f94b530722af
child 9940
a57c188857e9
child 9942
cf725cf57445
diff -r b41c9a7bcbbb -r a267ac36dd69 src/eric7/Project/Project.py
--- a/src/eric7/Project/Project.py	Mon Mar 20 10:43:29 2023 +0100
+++ b/src/eric7/Project/Project.py	Mon Mar 20 16:08:35 2023 +0100
@@ -634,14 +634,18 @@
                 self.setDirty(True)
             self.__pdata[dataKey] = data
 
-    def getData(self, category, key):
+    def getData(self, category, key, default=None):
         """
         Public method to get data out of the project data store.
 
-        @param category category of the data to get (string, one of
+        @param category category of the data to get (one of
             PROJECTTYPESPECIFICDATA, CHECKERSPARMS, PACKAGERSPARMS,
             DOCUMENTATIONPARMS or OTHERTOOLSPARMS)
-        @param key key of the data entry to get (string).
+        @type str
+        @param key key of the data entry to get
+        @type str
+        @param default value to return in case the key is not found (defaults to None)
+        @type Any (optional)
         @return a copy of the requested data or None
         """
         # __IGNORE_WARNING_D202__
@@ -658,7 +662,7 @@
         ):
             return copy.deepcopy(self.__pdata[category][key])
         else:
-            return None
+            return default
 
     def setData(self, category, key, data):
         """

eric ide

mercurial