Skip to content

Fix syntax warning on python 3.12 #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iptc/ip4tc.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class iptc(object):
class IPTCModule(object):
"""Superclass for Match and Target."""
pattern = re.compile(
'\s*(!)?\s*--([-\w]+)\s+(!)?\s*"?([^"]*?)"?(?=\s*(?:!?\s*--|$))')
r'\s*(!)?\s*--([-\w]+)\s+(!)?\s*"?([^"]*?)"?(?=\s*(?:!?\s*--|$))')

def __init__(self):
self._name = None
Expand Down
2 changes: 1 addition & 1 deletion iptc/xtables.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ class xtables_target(ct.Union):
_xtables_libdir = os.getenv("XTABLES_LIBDIR")
if _xtables_libdir is None:
import re
ldconfig_path_regex = re.compile('^(/.*):($| \(.*\)$)')
ldconfig_path_regex = re.compile(r'^(/.*):($| \(.*\)$)')
import subprocess
ldconfig = subprocess.Popen(
('/sbin/ldconfig', '-N', '-v'),
Expand Down