diff --git a/Forums/Utilities/utilities.py b/Forums/Utilities/utilities.py index a9e0026..659e456 100644 --- a/Forums/Utilities/utilities.py +++ b/Forums/Utilities/utilities.py @@ -6,6 +6,7 @@ import re import hashlib import base64 import io +import configparser from datetime import datetime, timedelta import datetime as fulldatetime from bs4 import BeautifulSoup @@ -17,7 +18,8 @@ from PIL import Image def generate_aes_key(): - from Forums.Initialization.forums_mining import config + config = configparser.ConfigParser() + config.read('../../setup.ini') secret = config.get('Encryption', 'secret') secret_bytes = bytes(secret, encoding="utf-8") diff --git a/MarketPlaces/Utilities/utilities.py b/MarketPlaces/Utilities/utilities.py index e8bea9f..120997e 100644 --- a/MarketPlaces/Utilities/utilities.py +++ b/MarketPlaces/Utilities/utilities.py @@ -6,6 +6,7 @@ import re import hashlib import base64 import io +import configparser from datetime import datetime, timedelta import datetime as fulldatetime from bs4 import BeautifulSoup @@ -17,7 +18,8 @@ from PIL import Image def generate_aes_key(): - from MarketPlaces.Initialization.markets_mining import config + config = configparser.ConfigParser() + config.read('../../setup.ini') secret = config.get('Encryption', 'secret') secret_bytes = bytes(secret, encoding="utf-8")