diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-09-10 19:38:52 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-09-10 19:40:57 +0300 |
commit | 7e359fa9bae682d7134ce87d88827c96d6e873fa (patch) | |
tree | eb463f38e999f308ddccd319555269a367782a80 | |
parent | ed1e82c348727a03aab68d0fd228208df390bef2 (diff) | |
download | obnam-7e359fa9bae682d7134ce87d88827c96d6e873fa.tar.gz |
Don't see if root is file, it isn't
We do not, in fact, currently support the live data root being
a non-directory. The code removed here assumes it can be (it can't,
neither LocalFS nor the SFTP plugin support it), and (sometimes)
gets the check for whether it is wrong, resulting in backing up the
parent directory instead, breaking things and confusing people.
-rw-r--r-- | obnamlib/plugins/backup_plugin.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/obnamlib/plugins/backup_plugin.py b/obnamlib/plugins/backup_plugin.py index 71fd839e..3b4b2729 100644 --- a/obnamlib/plugins/backup_plugin.py +++ b/obnamlib/plugins/backup_plugin.py @@ -460,16 +460,8 @@ class BackupPlugin(obnamlib.ObnamPlugin): self.open_or_reopen_fs(self.fs.reinit, root_url) def open_or_reopen_fs(self, func, root_url): - scheme, netloc, path, params, query, fragment = \ - urlparse.urlparse(root_url) - try: func(root_url) - if not self.fs.isdir(path): - parent_path = os.path.dirname(path) - parent_url = urlparse.urlunparse( - (scheme, netloc, parent_path, params, query, fragment)) - self.fs.reinit(parent_url) except OSError as e: if e.errno == errno.ENOENT: raise BackupRootDoesNotExist(root=root_url) |