mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-07 10:17:38 +02:00
Core: Increment minimum python version to 3.6
This commit is contained in:
@@ -3,11 +3,10 @@
|
||||
#
|
||||
"""Volatility 3 framework."""
|
||||
# Check the python version to ensure it's suitable
|
||||
# We currently require 3.5.3 since 3.5.1 has no typing.Type and 3.5.2 is broken for ''/delayed encapsulated types
|
||||
import glob
|
||||
import sys
|
||||
|
||||
required_python_version = (3, 5, 3)
|
||||
required_python_version = (3, 6, 0)
|
||||
if (sys.version_info.major != required_python_version[0] or sys.version_info.minor < required_python_version[1] or
|
||||
(sys.version_info.minor == required_python_version[1] and sys.version_info.micro < required_python_version[2])):
|
||||
raise RuntimeError(
|
||||
|
||||
@@ -30,23 +30,9 @@ class RegValueTypes(enum.Enum):
|
||||
REG_QWORD = 11
|
||||
REG_UNKNOWN = 99999
|
||||
|
||||
# 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:
|
||||
return cls(RegValueTypes.REG_UNKNOWN)
|
||||
def _missing_(cls, value):
|
||||
return cls(RegValueTypes.REG_UNKNOWN)
|
||||
|
||||
|
||||
class RegKeyFlags(enum.IntEnum):
|
||||
|
||||
Reference in New Issue
Block a user