Merge pull request #56 from cjlarose/master
Silence ImportErrors for optional dependencies
This commit is contained in:
commit
6ac6114b2e
4 changed files with 17 additions and 4 deletions
|
@ -7,7 +7,11 @@ Parameters:
|
|||
* cpu.critical: Critical threshold in % of CPU usage (defaults to 80%)
|
||||
"""
|
||||
|
||||
import psutil
|
||||
try:
|
||||
import psutil
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
import bumblebee.input
|
||||
import bumblebee.output
|
||||
import bumblebee.engine
|
||||
|
|
|
@ -7,7 +7,10 @@ Parameters:
|
|||
* cpu.critical: Critical threshold in % of memory used (defaults to 90%)
|
||||
"""
|
||||
|
||||
import psutil
|
||||
try:
|
||||
import psutil
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
import bumblebee.util
|
||||
import bumblebee.input
|
||||
|
|
|
@ -6,7 +6,10 @@ Parameters:
|
|||
* nic.exclude: Comma-separated list of interface prefixes to exclude (defaults to "lo,virbr,docker,vboxnet,veth")
|
||||
"""
|
||||
|
||||
import netifaces
|
||||
try:
|
||||
import netifaces
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
import bumblebee.util
|
||||
import bumblebee.input
|
||||
|
|
|
@ -18,7 +18,10 @@ import bumblebee.output
|
|||
import bumblebee.engine
|
||||
import json
|
||||
import time
|
||||
import requests
|
||||
try:
|
||||
import requests
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
class Module(bumblebee.engine.Module):
|
||||
def __init__(self, engine, config):
|
||||
|
|
Loading…
Reference in a new issue