mirror of https://github.com/borgbackup/borg.git
seeking to an invalid position is an IOError in python 3.2
python >= 3.3 raises OSError in this case.
This commit is contained in:
parent
12c7ef1329
commit
7e5d30f41a
|
@ -529,7 +529,7 @@ class LoggedIO:
|
|||
with open(filename, 'rb') as fd:
|
||||
try:
|
||||
fd.seek(-self.header_fmt.size, os.SEEK_END)
|
||||
except OSError as e:
|
||||
except (IOError, OSError) as e:
|
||||
# return False if segment file is empty or too small
|
||||
if e.errno == errno.EINVAL:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue