[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2826: CLI: allow dispatch functions to return a Deferred

Tahoe-LAFS trac at tahoe-lafs.org
Fri Sep 9 23:30:27 UTC 2016


#2826: CLI: allow dispatch functions to return a Deferred
------------------------+--------------------
     Reporter:  warner  |      Owner:  warner
         Type:  task    |     Status:  closed
     Priority:  normal  |  Milestone:  1.12.0
    Component:  code    |    Version:  1.11.0
   Resolution:  fixed   |   Keywords:
Launchpad Bug:          |
------------------------+--------------------
Changes (by Brian Warner <warner@…>):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"802cfc87fe8c9343f39e4ef80100e0d61817292a/trunk"
 802cfc8/trunk]:
 {{{
 #!CommitTicketReference repository="trunk"
 revision="802cfc87fe8c9343f39e4ef80100e0d61817292a"
 CLI: allow dispatch functions to return Deferred

 In addition, CLI functions are allowed to use sys.exit() instead of
 always needing to return the exit code as an integer.

 runner.py now knows about the blocking httplib calls in scripts/cli and
 scripts/magic_folder, and uses deferToThread() to invoke them. Those
 functions cannot return a Deferred: when rewrite them to use twisted.web
 or treq, we'll remove this deferToThread call.

 Option parsing was split out to a separate function for testing. We now
 use twisted.internet.task.react() to start the reactor, which required
 changing the way runner.py is tested.

 closes ticket:2826
 }}}

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2826#comment:2>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


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