Brian Warner
53bbcc33f6
new file, state-machine based
2016-05-20 18:49:20 -07:00
Brian Warner
104ef44d53
provide wormhole() as a function, rather than a class constructor
...
You must always provide a reactor= argument. In the future, omitting the
reactor= argument is how you ask for a blocking Wormhole.
2016-05-12 16:45:54 -07:00
Brian Warner
501af4b4ec
rename send_data/get_data to just send/get
2016-05-12 16:45:54 -07:00
Brian Warner
a086effd52
cmd_send: time import of tor_manager too
2016-05-05 19:10:01 -07:00
Brian Warner
24e52c0320
rewrite timing instrumentation: use context managers
2016-04-29 14:27:29 -07:00
Brian Warner
c017de5e4b
cosmetic cleanups to error messages
2016-04-25 18:24:39 -07:00
Brian Warner
2a6767ee6f
cmd_receive: internal error-handling cleanups
2016-04-25 18:24:18 -07:00
Brian Warner
7e8bfe314d
Call w.close() exactly once, in both success and error cases.
...
One downside is that we keep the wormhole channel allocated longer (we
have to finish the file transfer before we can deallocate it, which
could take a while for large files). Maybe we can fix this in the
future.
2016-04-25 17:53:00 -07:00
Brian Warner
34116c7b1f
CLI: document and return correct errors
...
Also clean up test_scripts.PregeneratedCode:
* fetch results from both sides at the same time
* only check rc when using a subprocess, since the direct call doesn't
use rc=0 anymore
* no need to cancel the other side's Deferred when one errors
* provide more information if stderr was non-empty
2016-04-25 17:52:59 -07:00
Brian Warner
e4a19748db
CLI: don't catch+wrap WrongPasswordError
...
Also remove .explain, now that we no longer wrap it in TransferError
2016-04-25 17:52:59 -07:00
Brian Warner
b96b052c96
start on cleanups: error catching in CLI dispatch
2016-04-25 17:52:59 -07:00
Brian Warner
4eaf88d7d2
cmd: remove _twisted suffix from function names
...
No longer necessary now that all commands are twisted-based.
2016-04-24 22:49:18 -07:00
Brian Warner
b0da2a9ac7
cmd_send: fold helper routines back into main function
...
These were split out to make the blocking- and twisted- based
implementations share some code, but now that we're down to just
Twisted, it's clearer to merge them back in.
2016-04-24 22:46:21 -07:00
Brian Warner
35639dafed
cmd_send: rearrange functions, no code changes
2016-04-24 22:40:25 -07:00
Brian Warner
e8d3689a3a
runner: display TransferErrors better
...
These are known failures (like file-not-found, transfer rejected, etc).
Display the error message, but not a traceback.
2016-04-24 12:10:51 -07:00
Brian Warner
86edf96412
switch to tqdm for nicer CLI progress bars
2016-04-24 12:04:05 -07:00
Brian Warner
16c6c0977e
progress: make it easier to change display width
2016-04-23 22:43:42 -07:00
Brian Warner
1e7c714453
CLI: don't hide errors so much
2016-04-20 22:36:43 -07:00
Brian Warner
b2c3f49038
unsplit txwormhole step 2: edit files
2016-04-20 19:18:41 -07:00
Brian Warner
85b6264826
unsplit cli step 2: edit files
2016-04-20 19:15:33 -07:00
Brian Warner
a3c836bcd3
unsplit cli step 1: move files
2016-04-20 18:54:36 -07:00