From 3367124e6b3d9ef01228329fc58328ed43cce83a Mon Sep 17 00:00:00 2001 From: Brian May Date: Sun, 6 Dec 2015 11:45:49 +1100 Subject: [PATCH] Fix more brokenness. --- sshuttle/methods/pf.py | 2 +- sshuttle/tests/test_methods_pf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sshuttle/methods/pf.py b/sshuttle/methods/pf.py index db91c6e..2c1fcf6 100644 --- a/sshuttle/methods/pf.py +++ b/sshuttle/methods/pf.py @@ -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') diff --git a/sshuttle/tests/test_methods_pf.py b/sshuttle/tests/test_methods_pf.py index 1808000..b27b310 100644 --- a/sshuttle/tests/test_methods_pf.py +++ b/sshuttle/tests/test_methods_pf.py @@ -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()