Explorar o código

Check if cryptography is installed

Oz N Tiram %!s(int64=8) %!d(string=hai) anos
pai
achega
a37812c73a
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      pwman/__init__.py

+ 7 - 0
pwman/__init__.py

@@ -26,6 +26,13 @@ import pkg_resources
 from pwman.util import config
 from pwman.data.factory import check_db_version
 
+try:
+    import cryptography
+    has_cryptography = True
+except ImportError:
+    has_cryptography = False
+
+
 appname = "pwman3"
 
 try: