From 371d077c2462454677ca59fcea987d871f4e9dfa Mon Sep 17 00:00:00 2001 From: westernmeadow Date: Tue, 22 Aug 2023 17:41:20 -0700 Subject: [PATCH] fixed circular import --- Forums/Utilities/utilities.py | 4 +++- MarketPlaces/Utilities/utilities.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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")