""" Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ import hashlib import json class ObjectEncoder(json.JSONEncoder): def default(self, o): if hasattr(o, "_value"): # pylint: disable=protected-access return o._value return o def get_hash(o): """Return a hash of an object""" return hashlib.sha1( json.dumps(o, sort_keys=True, cls=ObjectEncoder).encode("utf-8") ).hexdigest()
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
__init__.py | File | 164 B | 0644 |
|
_utils.py | File | 502 B | 0644 |
|
condition.py | File | 7.18 KB | 0644 |
|
conditions.py | File | 12.33 KB | 0644 |
|
equals.py | File | 3.69 KB | 0644 |
|