diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-02-15 21:29:47 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-02-15 21:29:47 +0000 |
commit | afca892fedf4e67a9248ab47f236273bc495b164 (patch) | |
tree | dc719fbbcf57e8397715961122b5fcd18248034b | |
parent | 4f2e67fec8fe5db0dd531e9cb40b89b6d055ca3c (diff) | |
download | obnam-afca892fedf4e67a9248ab47f236273bc495b164.tar.gz |
Convert repo-fmt_6.py to StructuredError
-rw-r--r-- | obnamlib/fmt_6/repo_fmt_6.py | 7 | ||||
-rw-r--r-- | test-gpghome/random_seed | bin | 600 -> 600 bytes |
2 files changed, 6 insertions, 1 deletions
diff --git a/obnamlib/fmt_6/repo_fmt_6.py b/obnamlib/fmt_6/repo_fmt_6.py index 185e9ed5..121b2507 100644 --- a/obnamlib/fmt_6/repo_fmt_6.py +++ b/obnamlib/fmt_6/repo_fmt_6.py @@ -29,6 +29,11 @@ import tracing import obnamlib +class ToplevelIsFileError(obnamlib.ObnamError): + + msg = 'File at repository root: {filename}' + + class HookedFS(object): '''A class to filter read/written data through hooks.''' @@ -46,7 +51,7 @@ class HookedFS(object): if len(parts) > 1: return parts[0] else: # pragma: no cover - raise obnamlib.Error('File at repository root: %s' % filename) + raise ToplevelIsFileError(filename=filename) def cat(self, filename, runfilters=True): data = self.fs.cat(filename) diff --git a/test-gpghome/random_seed b/test-gpghome/random_seed Binary files differindex 237d34c6..b237a51a 100644 --- a/test-gpghome/random_seed +++ b/test-gpghome/random_seed |