diff --git a/pyptables/__init__.py b/pyptables/__init__.py index cdf6260..6dae4c1 100644 --- a/pyptables/__init__.py +++ b/pyptables/__init__.py @@ -94,11 +94,12 @@ def add_line_numbers(string, start=1): def restore(tables): process = subprocess.Popen( - ["iptables-restore"], + ["cat"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) if hasattr(tables, 'to_iptables'): tables = tables.to_iptables() + tables = tables.encode('utf-8') return process.communicate(tables) diff --git a/setup.py b/setup.py index 3cebaac..6c6f5b5 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name='PyPTables', - version='1.0.4', + version='1.0.5', author='Jamie Cockburn', author_email='jamie_cockburn@hotmail.co.uk', packages=setuptools.find_packages(),