proton: short-circuit extra_limit = 0
Fixes: https://pagure.io/koji/issue/2455
This commit is contained in:
parent
8215a0893c
commit
0457065312
1 changed files with 3 additions and 1 deletions
|
|
@ -141,7 +141,9 @@ def _strip_extra(buildinfo):
|
|||
if not CONFIG:
|
||||
CONFIG = koji.read_config_files([(CONFIG_FILE, True)])
|
||||
if CONFIG.has_option('message', 'extra_limit'):
|
||||
extra_limit = CONFIG.getint('message', 'extra_limit')
|
||||
extra_limit = abs(CONFIG.getint('message', 'extra_limit'))
|
||||
if extra_limit == 0:
|
||||
return buildinfo
|
||||
extra_size = len(json.dumps(buildinfo.get('extra', {}), default=json_serialize))
|
||||
if extra_limit and extra_size > extra_limit:
|
||||
LOG.debug("Dropping 'extra' from build %s (length: %d > %d)" %
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue