summaryrefslogtreecommitdiff
path: root/obnamlib/plugins/fuse_plugin.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-02-23 17:44:42 +0000
committerLars Wirzenius <liw@liw.fi>2014-02-23 17:44:42 +0000
commit46327995de5058b95f93b86afbfd88e5d45f1413 (patch)
treeaf807a1354515087069307c280f82c5cb008e567 /obnamlib/plugins/fuse_plugin.py
parent9792ecdd53876f4b4f8b6344d640f3f2e98eab91 (diff)
downloadobnam-46327995de5058b95f93b86afbfd88e5d45f1413.tar.gz
Move test outside try/except block
There's no point in having it in the block.
Diffstat (limited to 'obnamlib/plugins/fuse_plugin.py')
-rw-r--r--obnamlib/plugins/fuse_plugin.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/obnamlib/plugins/fuse_plugin.py b/obnamlib/plugins/fuse_plugin.py
index 565bc24a..262340cf 100644
--- a/obnamlib/plugins/fuse_plugin.py
+++ b/obnamlib/plugins/fuse_plugin.py
@@ -130,9 +130,10 @@ class ObnamFuseFile(object):
tracing.trace('length=%r', length)
tracing.trace('offset=%r', offset)
+ if length == 0 or offset >= self.metadata.st_size:
+ return ''
+
try:
- if length == 0 or offset >= self.metadata.st_size:
- return ''
repo = self.fs.obnam.repo
gen, repopath = self.fs.get_gen_path(self.path)