Do not use except: without specifying exception
except: catches all exceptions, including exceptions like unbound variables etc. Instead specify only exceptions which can be thrown if database is corrupted (array overflow, decode() failure). read() and seek() shouldn't throw an exception if the file is open and accessible so these two exceptions seem to be enough.
Showing
Please
register
or
sign in
to comment