Lines 52-59
Link Here
|
52 |
""" Reload the registry data from file """ |
52 |
""" Reload the registry data from file """ |
53 |
try: |
53 |
try: |
54 |
self._data = cPickle.load(open(self._filename, "r")) |
54 |
self._data = cPickle.load(open(self._filename, "r")) |
55 |
except IOError, e: |
55 |
except (EOFError, IOError), e: |
56 |
if e.errno == errno.ENOENT: |
56 |
if isinstance(e, EOFError) or e.errno == errno.ENOENT: |
57 |
self._data = {} |
57 |
self._data = {} |
58 |
elif e.errno == PermissionDenied.errno: |
58 |
elif e.errno == PermissionDenied.errno: |
59 |
raise PermissionDenied(self._filename) |
59 |
raise PermissionDenied(self._filename) |