X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2Fdbbase.py;h=d0d4fb094d913a530aa1b8960d0fa1a0c6b33fed;hb=refs%2Fchanges%2F45%2F13345%2F6;hp=6b3a89a9fa2940836e68ad1878770af7f3affbf9;hpb=b2d732a70efa33e4bc478d351d64bc4adb4ea332;p=osm%2Fcommon.git 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 @@ def deep_update(dict_to_change, dict_reference): 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__(