Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typecheck variables in config files #14

Open
teunis90 opened this issue Nov 22, 2015 · 1 comment
Open

Typecheck variables in config files #14

teunis90 opened this issue Nov 22, 2015 · 1 comment
Assignees
Milestone

Comments

@teunis90
Copy link
Member

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.

@teunis90 teunis90 added this to the 2.0 milestone Nov 23, 2015
@teunis90 teunis90 self-assigned this Nov 27, 2015
@teunis90
Copy link
Member Author

Anybody a good idea how to accomplish this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant