fix broken non protected safedb get

This commit is contained in:
Kevin Froman 2021-01-17 19:44:24 +00:00
parent 30b73c7f7c
commit b6bb350b65

View File

@ -30,7 +30,7 @@ class SafeDB:
"""Wrapper around dbm to optionally encrypt db values.""" """Wrapper around dbm to optionally encrypt db values."""
def get(self, key: Union[str, bytes, bytearray]) -> bytes: def get(self, key: Union[str, bytes, bytearray]) -> bytes:
if self.protected: if not self.protected:
return self.db_conn[key] return self.db_conn[key]
return unprotect_string(self.db_conn[key]) return unprotect_string(self.db_conn[key])