From 14c4bbd1d9e5f87a7964fd69a60e7d21d69319ea Mon Sep 17 00:00:00 2001 From: maiphi <39464783+maiphi@users.noreply.github.com> Date: Sun, 20 May 2018 19:42:52 +0200 Subject: Make class SCons.Subst.Literal hashable When using Python 3, substitution of Literal objects requires the objects to be hashable, otherwise an error will be thrown. The hash value is that of the lstr member. --- src/engine/SCons/Subst.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/engine/SCons/Subst.py b/src/engine/SCons/Subst.py index 68d247f..0b4190b 100644 --- a/src/engine/SCons/Subst.py +++ b/src/engine/SCons/Subst.py @@ -86,6 +86,9 @@ class Literal(object): def __neq__(self, other): return not self.__eq__(other) + def __hash__(self): + return hash(self.lstr) + class SpecialAttrWrapper(object): """This is a wrapper for what we call a 'Node special attribute.' This is any of the attributes of a Node that we can reference from -- cgit v0.12