[tahoe-lafs-trac-stream] [tahoe-lafs] #1286: test failures with message "exceptions.AttributeError: 'StreamServerEndpointService' object has no attribute '_port'", and failure to write node.url file with Twisted 10.2

tahoe-lafs trac at tahoe-lafs.org
Tue Jan 18 00:06:14 UTC 2011


#1286: test failures with message "exceptions.AttributeError:
'StreamServerEndpointService' object has no attribute '_port'", and failure
to write node.url file with Twisted 10.2
----------------------------+-----------------------------------------------
     Reporter:  davidsarah  |       Owner:  warner                           
         Type:  defect      |      Status:  closed                           
     Priority:  major       |   Milestone:  1.8.2                            
    Component:  code        |     Version:  1.8.1                            
   Resolution:  fixed       |    Keywords:  twisted test news-needed reviewed
Launchpad Bug:              |  
----------------------------+-----------------------------------------------

Comment (by davidsarah):

 Reading over this patch again, some cleanups are possible:

 The Deferred in {{{self._started}}} to which {{{_write_nodeurl_file}}} is
 added as a callback, is fired just after setting {{{self._url}}}. So the
 "{{{if self._url:}}}" test in {{{_write_nodeurl_file}}} is not needed. (If
 we use {{{getURL()}}}, the code will assert if there is any bug that makes
 me wrong about this, causing an error to be logged.)

 We can use {{{fileutil.write}}} instead of open+write. Also it's clearer
 to make the {{{_write_nodeurl_file}}} a local function rather than a
 method.

 The comment "# this file is world-readable" is wrong in general; it will
 have the default permissions for files created by the node process (or the
 permissions are not changed if the file already exists).

 Finally, {{{.listener}}} is intended to be private so it should probably
 be {{{._listener}}}.

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


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