瀏覽代碼

Check if cryptography is installed

Oz N Tiram 8 年之前
父節點
當前提交
a37812c73a
共有 1 個文件被更改,包括 7 次插入0 次删除
  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: