Skip to content

Typecheck variables in config files #14

@teunis90

Description

@teunis90

Today we got a failed backup due to a config file typo:

Reading main config from /etc/autorsyncbackup/main.yaml
Writing to logfile /var/log/autorsyncbackup/autorsyncbackup.log
Starting AutoRsyncBackup
Traceback (most recent call last):
 File "/usr/local/bin/autorsyncbackup", line 48, in <module>
   director.processBackupStatus(job)
 File "/usr/local/share/autorsyncbackup/src/director.py", line 236, in processBackupStatus
   job.backupstatus['fileset'] = ':'.join(job.fileset)
TypeError: sequence item 0: expected string, int found

We should not only check the YAML file for vadility but also type check the individual variables.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions