backend.helpers¶
-
backend.helpers.
wait_log
(log, reason=u"I don't know why.", timeout=5)[source]¶ We need to wait a while, this should happen only when copr converges to boot-up/restart/..
-
class
backend.helpers.
SortedOptParser
(usage=None, option_list=None, option_class=<class optparse.Option>, version=None, conflict_handler='error', description=None, formatter=None, add_help_option=True, prog=None, epilog=None)[source]¶ Optparser which sorts the options by opt before outputting –help
-
backend.helpers.
_get_conf
(cp, section, option, default, mode=None)[source]¶ To make returning items from config parser less irritating
Parameters: mode – convert obtained value, possible modes: - None (default): do nothing - “bool” or “boolean” - “int” - “float”
-
backend.helpers.
chroot_to_branch
(chroot)[source]¶ Get a git branch name from chroot. Follow the fedora naming standard.
-
backend.helpers.
register_build_result
(opts=None, failed=False)[source]¶ Remember fails to redis. Successful build resets counter to zero.
Parameters: - opts – BackendConfig, when opts not provided default config location will be used
- failed (boolean) – failure flag
- origin (str) – name of component produced failure, default: builder
-
backend.helpers.
get_redis_connection
(opts)[source]¶ Creates redis client object using backend config
Return type: StrictRedis