mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-22 06:18:48 +00:00
main.py - fixed imports for "Crypto" and "Cryptodome" (on debian)
This commit is contained in:
parent
7c8a113fbd
commit
52fb18dea0
10
app/main.py
10
app/main.py
@ -19,8 +19,14 @@ from starlette.middleware.cors import CORSMiddleware
|
||||
from starlette.responses import StreamingResponse, JSONResponse, HTMLResponse
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
from Cryptodome.PublicKey import RSA # Crypto | Cryptodome on Debian
|
||||
from Cryptodome.PublicKey.RSA import RsaKey # Crypto | Cryptodome on Debian
|
||||
|
||||
try:
|
||||
# Crypto | Cryptodome on Debian
|
||||
from Crypto.PublicKey import RSA
|
||||
from Crypto.PublicKey.RSA import RsaKey
|
||||
except ModuleNotFoundError:
|
||||
from Cryptodome.PublicKey import RSA
|
||||
from Cryptodome.PublicKey.RSA import RsaKey
|
||||
|
||||
from orm import Origin, Lease, init as db_init
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user