Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
Related to issue duo-labs#197

Changed pkg_resources to importlib
  • Loading branch information
ahsansmir committed Oct 7, 2021
1 parent a881a63 commit 56e7678
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions parliament/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
import jsoncfg
import re

import pkg_resources
from importlib import resources
import yaml

# On initialization, load the IAM data
iam_definition_path = pkg_resources.resource_filename(__name__, "iam_definition.json")
iam_definition = json.load(open(iam_definition_path, "r"))
iam_definition_path = resources.open_text(__name__, "iam_definition.json")
iam_definition = json.load(iam_definition_path)

# And the config data
config_path = pkg_resources.resource_filename(__name__, "config.yaml")
config = yaml.safe_load(open(config_path, "r"))
config_path = resources.open_text(__name__, "config.yaml")
config = yaml.safe_load(config_path)


def override_config(override_config_path):
Expand Down

0 comments on commit 56e7678

Please sign in to comment.