Package Ganga :: Package Lib :: Package MonitoringServices :: Package Dashboard :: Module CommonUtil
[hide private]
[frames] | no frames]

Module CommonUtil

source code

Common utilities.

N.B. This code is under development and should not generally be used or relied upon.

Functions [hide private]
 
env(key)
Return the environment variable value corresponding to key.
source code
 
hostname()
Try to get the hostname in the most possible reliable way as described in the Python LibRef.
source code
 
stdout(command)
Execute the command in a subprocess and return stdout.
source code
 
strip_to_none(value)
Returns the stripped string representation of value, or None if this is None or an empty string.
source code
 
utcnow()
Return a UTC datetime with no timezone specified.
source code
Variables [hide private]
  __package__ = None
hash(x)
Function Details [hide private]

env(key)

source code 

Return the environment variable value corresponding to key.

If the variable is undefined or empty then None is returned.

stdout(command)

source code 

Execute the command in a subprocess and return stdout.

If the exit code is non-zero then None is returned.