mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Gate the statistics module (#35539)
This commit is contained in:
parent
adbbd472f2
commit
669e979dec
@ -10,7 +10,19 @@ values are stored and computed, such as averages etc.
|
||||
|
||||
# import python libs
|
||||
from __future__ import absolute_import
|
||||
import statistics
|
||||
|
||||
try:
|
||||
import statistics
|
||||
HAS_STATS = True
|
||||
except ImportError:
|
||||
HAS_STATS = False
|
||||
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
The statistics module must be pip installed
|
||||
'''
|
||||
return HAS_STATS
|
||||
|
||||
|
||||
def calc(name, num, oper, ref=None):
|
||||
|
Loading…
Reference in New Issue
Block a user