collectd_haproxy.compat

collectd_haproxy.compat.iteritems(dictionary)[source]

Helper function for iterating over (key, value) dict tuples.

In Python 3 the “iteritems()” method went away and “items()” became an iterator method.

Parameters:dictionary (dict) – The dictionary to iterate over.
collectd_haproxy.compat.coerce_long(string)[source]

Function for coercing a string into a long (“10.4” -> 10.4).

In Python 3 the long and int types were unified, so no more “long”.

Parameters:string (str) – The string value to coerce.