summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2021-05-19 11:50:20 +0800
committerXusheng <xusheng@vector35.com>2021-05-19 12:22:00 +0800
commit695954efd12fd336224073ada03dede782495746 (patch)
treeecbc95018828943e2ba6474d02867842bbd09c50 /python
parent6c38e866c43e9bf12c0910ab76d8d8e3bac15b06 (diff)
Divide metadata into user and auto metadata
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index e19e0a8a..7fc37287 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -6078,7 +6078,7 @@ class BinaryView(object):
raise KeyError(key)
return metadata.Metadata(handle=md_handle).value
- def store_metadata(self, key, md):
+ def store_metadata(self, key, md, isAuto = False):
"""
`store_metadata` stores an object for the given key in the current BinaryView. Objects stored using
`store_metadata` can be retrieved when the database is reopened. Objects stored are not arbitrary python
@@ -6088,6 +6088,10 @@ class BinaryView(object):
:param str key: key value to associate the Metadata object with
:param Varies md: object to store.
+ :param bool isAuto: whether the metadata is an auto metadata. Most metadata should
+ keep this as False. Only those automatically generated metadata should have this set
+ to True. Auto metadata is not saved into the database and is presumably re-genereated
+ when re-opening the database.
:rtype: None
:Example:
@@ -6103,7 +6107,7 @@ class BinaryView(object):
"""
if not isinstance(md, metadata.Metadata):
md = metadata.Metadata(md)
- core.BNBinaryViewStoreMetadata(self.handle, key, md.handle)
+ core.BNBinaryViewStoreMetadata(self.handle, key, md.handle, isAuto)
def remove_metadata(self, key):
"""