[tahoe-lafs-trac-stream] [tahoe-lafs] #1470: tahoe.cfg with UTF-8 BOM should be accepted

tahoe-lafs trac at tahoe-lafs.org
Sat Aug 13 20:50:10 PDT 2011


#1470: tahoe.cfg with UTF-8 BOM should be accepted
----------------------------+-------------------------------------
     Reporter:  davidsarah  |      Owner:  davidsarah
         Type:  defect      |     Status:  new
     Priority:  major       |  Milestone:  soon
    Component:  code        |    Version:  1.8.2
   Resolution:              |   Keywords:  unicode config reviewed
Launchpad Bug:              |
----------------------------+-------------------------------------

Comment (by davidsarah):

 Replying to [comment:3 zooko]:
 > I reviewed these patches and give them +1, although I wonder if it was
 intentional that it changes the [behaviour] in the case that
 {{{tahoe.cfg}}} doesn't exist.

 It doesn't change the behaviour in that case. {{{SafeConfigParser.read}}}
 is documented to have no effect if the file doesn't exist:
 {{{
 Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
 [GCC 4.4.5] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from ConfigParser import SafeConfigParser
 >>> c = SafeConfigParser()
 >>> import os
 >>> os.path.exists('nonexistent')
 False
 >>> c.read(['nonexistent'])
 []
 >>> c.sections()
 []
 }}}

 Perhaps we ''should'' refuse to start in that case, but currently we just
 use the defaults for all options.

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1470#comment:4>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list