twisted.python.logfile.BaseLogFile.__init__ uses an assert to check the existence of the directory passed to it

[email protected] Sat, 06 Feb 2010 15:14:06 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from exarkun <[email protected]>:

This is wrong for a number of reasons.

  1. It shouldn't use assert
  1. When it fails it provides too little information
  1. It doesn't guarantee things will work, since the directory could be removed after the check

Just letting the open fail later on would provide essentially the same behavior, but with more information.  A test and documentation for this failure mode wouldn't hurt, either.


----------
Type     : defect
Component: core
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4259