summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2015-05-18 20:54:04 +0000
committerMicah Lee <micah@micahflee.com>2015-05-18 20:54:04 +0000
commit1f52c9b565ca26a698509194f2856fa56d5fb554 (patch)
treeaaefd030c2d83a7a6f7b4ba5ea30806b8228c02e
parent5b46688367c2eb1ef8606b5ad8d461a0413d7f97 (diff)
downloadonionshare-1f52c9b565ca26a698509194f2856fa56d5fb554.tar.gz
onionshare-1f52c9b565ca26a698509194f2856fa56d5fb554.zip
Handles a new exception that gets thrown in Tails using a bridge while waiting for the HS
-rw-r--r--onionshare/onionshare.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py
index 2e948c76..54f3b27e 100644
--- a/onionshare/onionshare.py
+++ b/onionshare/onionshare.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-import os, sys, subprocess, time, argparse, inspect, shutil, socket, threading, urllib2, tempfile
+import os, sys, subprocess, time, argparse, inspect, shutil, socket, threading, urllib2, httplib, tempfile
import socks
from stem.control import Controller
@@ -208,6 +208,9 @@ class OnionShare(object):
except urllib2.HTTPError: # Tails error
sys.stdout.write('{0:s}\n'.format(strings._('wait_for_hs_nope')))
sys.stdout.flush()
+ except httplib.BadStatusLine: # Tails (with bridge) error
+ sys.stdout.write('{0:s}\n'.format(strings._('wait_for_hs_nope')))
+ sys.stdout.flush()
except KeyboardInterrupt:
return False
return True