Menu

#1 GetCache() s/SystemError/IOError/

open
nobody
None
5
2005-08-11
2005-08-11
No

as non-root:

>>> apt_pkg.GetCache()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
SystemError: The list of sources could not be read.
>>> ^D

Raising a SystemError seems unpythonic to me--I suggest raising an IOError instead. Or, say, create your own PermissionError class, subclass of IOError.

Discussion


Log in to post a comment.