diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-12-03 15:07:25 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-12-03 15:07:25 +0000 |
commit | 0fceeb916c0efd07d22bbc9d633dcc2cabbae8be (patch) | |
tree | c3a7ba18dcfd0a8da98a28ffd384ccf778319421 | |
parent | d38d8613a619d8d668ee3b4e4e0ec14cd804bd6a (diff) | |
download | obnam-0fceeb916c0efd07d22bbc9d633dcc2cabbae8be.tar.gz |
Complain if no backup roots have been given
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | obnamlib/plugins/backup_plugin.py | 5 |
2 files changed, 4 insertions, 2 deletions
@@ -50,6 +50,7 @@ Bug fixes: by ROGERIO DE CARVALHO BASTOS and patched by Peter Valdemar Mørch. * Setuid and setgid bits are now restored correctly, when restore happens as root. Reported by Pavel Kokolemin. +* Obnam now complains if no backup roots have been specfied. Version 1.2, released 2012-10-06 -------------------------------- diff --git a/obnamlib/plugins/backup_plugin.py b/obnamlib/plugins/backup_plugin.py index 43973fa0..686c369d 100644 --- a/obnamlib/plugins/backup_plugin.py +++ b/obnamlib/plugins/backup_plugin.py @@ -274,8 +274,9 @@ class BackupPlugin(obnamlib.ObnamPlugin): self.repo.start_generation() self.fs = None roots = self.app.settings['root'] + args - if roots: - self.backup_roots(roots) + if not roots: + raise obnamlib.Error('No backup roots specified') + self.backup_roots(roots) self.what('committing changes to repository') if not self.pretend: self.repo.lock_shared() |