require pycurl for linode module
This commit is contained in:
parent
71e4d76da9
commit
798b4bdf1b
1 changed files with 9 additions and 4 deletions
13
cloud/linode
13
cloud/linode
|
@ -88,7 +88,7 @@ options:
|
|||
description:
|
||||
- how long before wait gives up, in seconds
|
||||
default: 300
|
||||
requirements: [ "linode-python" ]
|
||||
requirements: [ "linode-python", "pycurl" ]
|
||||
author: Vincent Viallet
|
||||
notes:
|
||||
- LINODE_API_KEY env variable can be used instead
|
||||
|
@ -156,14 +156,19 @@ import time
|
|||
import os
|
||||
|
||||
try:
|
||||
# linode module raise warning due to ssl - silently ignore them ...
|
||||
import warnings
|
||||
warnings.simplefilter("ignore")
|
||||
import pycurl
|
||||
except ImportError:
|
||||
print("failed=True msg='pycurl required for this module'")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
try:
|
||||
from linode import api as linode_api
|
||||
except ImportError:
|
||||
print("failed=True msg='linode-python required for this module'")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def randompass():
|
||||
'''
|
||||
Generate a long random password that comply to Linode requirements
|
||||
|
|
Loading…
Reference in a new issue