diff options
| author | Alex <git@ajschof.me> | 2025-02-19 15:58:28 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-19 15:58:28 +0000 |
| commit | 4066bf747e1e4c938526957c119f3f1485ee251e (patch) | |
| tree | 9a1e95f4ccbdd04e19d67a6c13641a19c4d4f3e0 /obfuscator/utils.py | |
| parent | f24955044c4c05e37aba4efb505ec63b44113912 (diff) | |
| parent | 5402af2c7198a685a57a05e29a869e1e72a6b877 (diff) | |
| download | gdpr-obfuscator-4066bf747e1e4c938526957c119f3f1485ee251e.tar.gz gdpr-obfuscator-4066bf747e1e4c938526957c119f3f1485ee251e.zip | |
Merge pull request #8 from ajschofield/refining-phase
mostly minor changes (fixing things up)
Diffstat (limited to 'obfuscator/utils.py')
| -rw-r--r-- | obfuscator/utils.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/obfuscator/utils.py b/obfuscator/utils.py index 2e4211f..77ca1cf 100644 --- a/obfuscator/utils.py +++ b/obfuscator/utils.py @@ -1,15 +1,16 @@ # Utility functions from obfuscator.logger import get_logger -# Create the logger -logger = get_logger("CLI") +class Utilities: + def __init__(self, logger=None): + self.logger = get_logger("UTILITIES", logger) -def get_s3_path(uri): - parts = uri.replace("s3://", "").split("/") - logger.debug(f"Parts: {parts}") - bucket = parts.pop(0) - logger.debug(f"Bucket: {bucket}") - key = "/".join(parts) - logger.debug(f"Key: {key}") - return bucket, key + def get_s3_path(self, uri): + parts = uri.replace("s3://", "").split("/") + self.logger.debug(f"Parts: {parts}") + bucket = parts.pop(0) + self.logger.debug(f"Bucket: {bucket}") + key = "/".join(parts) + self.logger.debug(f"Key: {key}") + return bucket, key |
