Skip to content
Browse files

Fix #2132

  • Loading branch information...
1 parent 2f48e4c commit 3e2ee756f9b0a719e746e6471fab2de41998f1d0 @thatch45 thatch45 committed Sep 30, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 salt/modules/ca.py
View
12 salt/modules/ca.py
@@ -19,7 +19,13 @@
import time
import logging
import hashlib
-import OpenSSL
+
+has_ssl = False
+try:
+ import OpenSSL
+ has_ssl = True
+except ImportError:
+ pass
# Import Salt libs
from salt.exceptions import CommandExecutionError
@@ -30,7 +36,9 @@ def __virtual__():
'''
Only load this module if the ca config options are set
'''
- return 'ca'
+ if has_ssl:
+ return 'ca'
+ return False
def _cert_base_path():

0 comments on commit 3e2ee75

Please sign in to comment.
Something went wrong with that request. Please try again.