fagga/transmission-remote-cli — Issue #51: Entering "View Details" on Magnet Link Before Metadata is Completed Always Crashes
Author: gzio
Created: 2012-02-12 03:38:10+00:00
State: open

magnet links typically need a few minutes to download the metadata and start the torrent. if i happen to "View Details" during this time the script crashes, and also causes the transmission-dameon to abuptly crash and exit.

a better behavior when entering "View Details" would be to skip to a message like "Please Wait for Metadata to Complete..." to avoid the crashing.

```
Traceback (most recent call last):
File "./Transmission-remote-cli.py", line 3023, in
config.get('Connection', 'password')))
File "./Transmission-remote-cli.py", line 800, in __init__
self.run()
File "./Transmission-remote-cli.py", line 923, in run
if self.handle_user_input():
File "./Transmission-remote-cli.py", line 1355, in handle_user_input
f(c)
File "./Transmission-remote-cli.py", line 1030, in select_torrent_detail_view
self.server.wait_for_details_update()
File "./Transmission-remote-cli.py", line 670, in wait_for_details_update
self.wait_for_update(77)
File "./Transmission-remote-cli.py", line 674, in wait_for_update
self.update(0) # send request
File "./Transmission-remote-cli.py", line 337, in update
request.send_request()
File "./Transmission-remote-cli.py", line 186, in send_request
self.open_request = urllib2.urlopen(self.http_request)
File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 1170, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.6/urllib2.py", line 1143, in do_open
r = h.getresponse()
File "/usr/lib/python2.6/httplib.py", line 990, in getresponse
response.begin()
File "/usr/lib/python2.6/httplib.py", line 391, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.6/httplib.py", line 355, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine
```