def get_int(config, key, default):
try:<EOL><INDENT>return int(config[key])<EOL><DEDENT>except (KeyError, ValueError):<EOL><INDENT>return default<EOL><DEDENT>
A helper to retrieve an integer value from a given dictionary
containing string values.  If the requested value is not present
in the dictionary, or if it cannot be converted to an integer, a
default value will be returned instead.

:param config: The dictionary containing the desired value.
:param key: The dictionary key for the desired value.
:param default: The default value to return, if the key isn't set
                in the dictionary, or if the value set isn't a
                legal integer value.

:returns: The desired integer value.