Ubuntu 22.04 and Python 3.10 preparation
Change-Id: I740202d48977467a0c2b2afb4b17bd7597331dee
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
diff --git a/osm_common/dbbase.py b/osm_common/dbbase.py
index 6b3a89a..d0d4fb0 100644
--- a/osm_common/dbbase.py
+++ b/osm_common/dbbase.py
@@ -14,7 +14,7 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-import asyncio
+
from base64 import b64decode, b64encode
from copy import deepcopy
from http import HTTPStatus
@@ -673,18 +673,16 @@
class Encryption(DbBase):
- def __init__(self, uri, config, encoding_type="ascii", loop=None, logger_name="db"):
+ def __init__(self, uri, config, encoding_type="ascii", logger_name="db"):
"""Constructor.
Args:
uri (str): Connection string to connect to the database.
config (dict): Additional database info
encoding_type (str): ascii, utf-8 etc.
- loop (object): Asyncio Loop
logger_name (str): Logger name
"""
- self.loop = loop or asyncio.get_event_loop()
self._secret_key = None # 32 bytes length array used for encrypt/decrypt
self.encrypt_mode = AES.MODE_ECB
super(Encryption, self).__init__(