Skip to content

Commit

Permalink
Fix validation of configuration files for timers.
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Jan 23, 2019
1 parent 54e60fa commit 67c61f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions irrd/conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ def _check_staging_config(self) -> List[str]:

if not str(details.get('nrtm_port', '43')).isnumeric():
errors.append(f'Setting nrtm_port for source {name} must be a number.')
if not details.get('import_timer', '0').isnumeric():
if not str(details.get('import_timer', '0')).isnumeric():
errors.append(f'Setting import_timer for source {name} must be a number.')
if not details.get('export_timer', '0').isnumeric():
if not str(details.get('export_timer', '0')).isnumeric():
errors.append(f'Setting export_timer for source {name} must be a number.')

if config.get('log.level') and not config.get('log.level') in ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']:
Expand Down

0 comments on commit 67c61f1

Please sign in to comment.