From c5cd3595deb37b06ae9fea1a324c4116ff7c4c58 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 25 Dec 2016 13:44:03 +0000 Subject: [PATCH] Fix up minor typo and hard depend on >= python 3.4. --- volatility/framework/__init__.py | 2 +- volatility/framework/symbols/__init__.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/volatility/framework/__init__.py b/volatility/framework/__init__.py index 644937af7..01b1096fe 100644 --- a/volatility/framework/__init__.py +++ b/volatility/framework/__init__.py @@ -84,4 +84,4 @@ def import_files(base_module): # Check the python version to ensure it's suitable required_python_version = (3, 4) if sys.version_info.major != required_python_version[0] or sys.version_info.minor < required_python_version[1]: - raise RuntimeError("Volatility framework requires python version {}.{} or greater".format(required_python_version)) + raise RuntimeError("Volatility framework requires python version {}.{} or greater".format(*required_python_version)) diff --git a/volatility/framework/symbols/__init__.py b/volatility/framework/symbols/__init__.py index 43ea6d4ca..db883a254 100644 --- a/volatility/framework/symbols/__init__.py +++ b/volatility/framework/symbols/__init__.py @@ -6,6 +6,7 @@ Created on 7 Feb 2013 import collections import collections.abc +import enum import logging from volatility.framework import constants, exceptions, interfaces, objects @@ -14,11 +15,10 @@ from volatility.framework.symbols import native, windows vollog = logging.getLogger(__name__) -class SymbolType(object): - # Suitably random values until we make this an Enum and require python >= 3.4 - TYPE = 143534545 - SYMBOL = 28293045 - ENUM = 395940348 +class SymbolType(enum.Enum): + TYPE = 1 + SYMBOL = 2 + ENUM = 3 class SymbolSpace(collections.abc.Mapping):