[tahoe-lafs-trac-stream] [tahoe-lafs] #1425: blacklist support
tahoe-lafs
trac at tahoe-lafs.org
Sat Aug 20 22:08:01 PDT 2011
#1425: blacklist support
-----------------------------------+-------------------------------------
Reporter: warner | Owner: davidsarah
Type: enhancement | Status: new
Priority: major | Milestone: 1.9.0
Component: code-frontend-web | Version: 1.8.2
Resolution: | Keywords: blacklist review-needed
Launchpad Bug: |
-----------------------------------+-------------------------------------
Comment (by davidsarah):
{{{
try:
current_mtime = os.stat(self.blacklist_fn).st_mtime
except EnvironmentError:
# unreadable blacklist file means no blacklist
self.entries.clear()
return
}}}
If the file exists but isn't readable (for instance, if we don't have
permission to read it), that should not be a silent error. Make it either:
{{{
except EnvironmentError:
if os.path.exists(self.blacklist_fn):
raise
# nonexistent blacklist file means no blacklist
self.entries.clear()
return
}}}
or
{{{
except EnvironmentError, e:
# unreadable blacklist file means no blacklist
if os.path.exists(self.blacklist_fn):
twisted_log.err(e, "unreadable blacklist file")
self.entries.clear()
return
}}}
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1425#comment:15>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list