From c7e0ff9fa0c81f350e8a2e226857e903573d2d96 Mon Sep 17 00:00:00 2001 From: Dave Lassalle Date: Wed, 29 Aug 2018 11:01:04 -0500 Subject: [PATCH] docstring and comment about get() vs _missing_() --- volatility/framework/symbols/windows/extensions/registry.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/volatility/framework/symbols/windows/extensions/registry.py b/volatility/framework/symbols/windows/extensions/registry.py index a34527e10..30c29bc05 100644 --- a/volatility/framework/symbols/windows/extensions/registry.py +++ b/volatility/framework/symbols/windows/extensions/registry.py @@ -26,13 +26,16 @@ class RegValueTypes(enum.Enum): REG_QWORD = 11 REG_UNKNOWN = 99999 - # TODO: Uncomment once we target python-3.6 + # TODO: This _missing_() method can replace the get() method below + # if support for Python 3.6 is added in the future # @classmethod # def _missing_(cls, value): # return cls(RegValueTypes.REG_UNKNOWN) @classmethod def get(cls, value): + """An alternative method for using this enum when the value may be unknown. + This is used to support unknown value requests in Python <3.6.""" try: return cls(value) except ValueError: