Fix more brokenness.

This commit is contained in:
Brian May 2015-12-06 11:45:49 +11:00
parent aaa6062329
commit 3367124e6b
2 changed files with 2 additions and 2 deletions

View File

@ -233,7 +233,7 @@ class Method(BaseMethod):
pfctl('-a sshuttle -F all')
if sys.platform == "darwin":
if _pf_context['Xtoken'] is not None:
pfctl('-X %s' % _pf_context['Xtoken'])
pfctl('-X %s' % _pf_context['Xtoken'].decode("ASCII"))
elif _pf_context['started_by_sshuttle']:
pfctl('-d')

View File

@ -176,7 +176,7 @@ def test_setup_firewall(mock_pf_get_dev, mock_ioctl, mock_pfctl):
assert mock_ioctl.mock_calls == []
assert mock_pfctl.mock_calls == [
call('-a sshuttle -F all'),
call("-X b'abcdefg'"),
call("-X abcdefg"),
]
mock_pf_get_dev.reset_mock()
mock_pfctl.reset_mock()