Skip to content

Commit

Permalink
Set _xtables._xtables_pending_matches and ._xtables_pending_targets
Browse files Browse the repository at this point in the history
to None if they are not found in libxtables.
  • Loading branch information
ericvsmith committed Aug 28, 2013
1 parent 61040db commit 00306d8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions iptc/xtables.py
Expand Up @@ -762,11 +762,17 @@ class xtables(object):

_xtables_xt_params = ct.c_void_p.in_dll(_lib_xtables, "xt_params")
_xtables_matches = (ct.c_void_p.in_dll(_lib_xtables, "xtables_matches"))
_xtables_pending_matches = (ct.c_void_p.in_dll(_lib_xtables,
"xtables_pending_matches"))
try:
_xtables_pending_matches = (ct.c_void_p.in_dll(_lib_xtables,
"xtables_pending_matches"))
except ValueError:
_xtables_pending_matches = ct.POINTER(None)
_xtables_targets = (ct.c_void_p.in_dll(_lib_xtables, "xtables_targets"))
_xtables_pending_targets = (ct.c_void_p.in_dll(_lib_xtables,
"xtables_pending_targets"))
try:
_xtables_pending_targets = (ct.c_void_p.in_dll(_lib_xtables,
"xtables_pending_targets"))
except ValueError:
_xtables_pending_targets = ct.POINTER(None)

_cache = weakref.WeakValueDictionary()

Expand Down

0 comments on commit 00306d8

Please sign in to comment.