From e527a88a2e140678f219519c8472bf69bb37c7d9 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 20 Apr 2020 21:00:34 -0700 Subject: [PATCH] Fix Python 2 compatibility import --- plexpy/logger.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plexpy/logger.py b/plexpy/logger.py index 29ebbbfd..2ab6d101 100644 --- a/plexpy/logger.py +++ b/plexpy/logger.py @@ -33,10 +33,10 @@ import traceback import plexpy if plexpy.PYTHON2: - from helpers import is_public_ip + import helpers from config import _BLACKLIST_KEYS, _WHITELIST_KEYS else: - from plexpy.helpers import is_public_ip + from plexpy import helpers from plexpy.config import _BLACKLIST_KEYS, _WHITELIST_KEYS @@ -153,7 +153,7 @@ class PublicIPFilter(RegexFilter): self.regex = re.compile(r'[0-9]+(?:[.-][0-9]+){3}(?!\d*-[a-z0-9]{6})') def replace(self, text, ip): - if is_public_ip(ip.replace('-', '.')): + if helpers.is_public_ip(ip.replace('-', '.')): partition = '-' if '-' in ip else '.' return text.replace(ip, ip.partition(partition)[0] + (partition + '***') * 3) return text