Skip to content

Commit 335a671

Browse files
committed
fixed code quality
1 parent a3cb1c1 commit 335a671

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/protocol.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44
# pylint: disable=too-many-boolean-expressions,too-many-return-statements
55
# pylint: disable=too-many-locals,too-many-statements
6+
# pylint: disable=R0204
67

78
import base64
89
import hashlib
@@ -199,18 +200,18 @@ def checkIPv4Address(host, hostStandardFormat, private=False):
199200
otherwise returns False
200201
"""
201202
if six.PY2:
202-
IP_OCT1 = '\x7F' # 127/8
203-
IP_OCT2 = '\x0A' # 10/8
204-
IP_OCT3 = '\xC0\xA8' # 192.168/16
205-
IP_OCT4 = '\xAC\x10' # 172.16
206-
IP_OCT5 = '\xAC\x20' # 12
203+
IP_OCT1 = '\x7F' # 127/8
204+
IP_OCT2 = '\x0A' # 10/8
205+
IP_OCT3 = '\xC0\xA8' # 192.168/16
206+
IP_OCT4 = '\xAC\x10' # 172.16
207+
IP_OCT5 = '\xAC\x20' # 12
207208
else:
208-
IP_OCT1 = 127 # 127/8
209-
IP_OCT2 = 10 # 10/8
210-
IP_OCT3 = b'\xC0\xA8' # 192.168/16
211-
IP_OCT4 = b'\xAC\x10' # 172.16
212-
IP_OCT5 = b'\xAC\x20' # 12
213-
209+
IP_OCT1 = 127 # 127/8
210+
IP_OCT2 = 10 # 10/8
211+
IP_OCT3 = b'\xC0\xA8' # 192.168/16
212+
IP_OCT4 = b'\xAC\x10' # 172.16
213+
IP_OCT5 = b'\xAC\x20' # 12
214+
214215
if host[0] == IP_OCT1:
215216
if not private:
216217
logger.debug(

0 commit comments

Comments
 (0)