Skip to content

Commit

Permalink
re #2 - Fixed error in restore in python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Cockburn committed Nov 22, 2018
1 parent 6eec499 commit 4556fff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyptables/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setuptools.setup(
name='PyPTables',
version='1.0.4',
version='1.0.5',
author='Jamie Cockburn',
author_email='[email protected]',
packages=setuptools.find_packages(),
Expand Down

0 comments on commit 4556fff

Please sign in to comment.