mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 06:27:59 +00:00
don't use lazy import for aputils
This commit is contained in:
parent
9bf45a54d1
commit
e6f2174ad4
|
@ -1,9 +1,9 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import aputils
|
|
||||||
import json
|
import json
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
|
from aputils.signer import Signer
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from . import logger as logging
|
from . import logger as logging
|
||||||
|
@ -85,11 +85,11 @@ class RelayDatabase(dict):
|
||||||
|
|
||||||
if not self['private-key']:
|
if not self['private-key']:
|
||||||
logging.info('No actor keys present, generating 4096-bit RSA keypair.')
|
logging.info('No actor keys present, generating 4096-bit RSA keypair.')
|
||||||
self.signer = aputils.Signer.new(self.config.keyid, size=4096)
|
self.signer = Signer.new(self.config.keyid, size=4096)
|
||||||
self['private-key'] = self.signer.export()
|
self['private-key'] = self.signer.export()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.signer = aputils.Signer(self['private-key'], self.config.keyid)
|
self.signer = Signer(self['private-key'], self.config.keyid)
|
||||||
|
|
||||||
self.save()
|
self.save()
|
||||||
return not new_db
|
return not new_db
|
||||||
|
|
Loading…
Reference in a new issue