Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21010f7

Browse files
committed
minor beautification
1 parent 2de88bd commit 21010f7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/core/settings.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
import logging
1111
import os
12+
import _socket
13+
import socket
1214
import subprocess
1315
import sys
1416

@@ -359,4 +361,8 @@
359361
CRAWL_EXCLUDE_EXTENSIONS = ("gif","jpg","jar","tif","bmp","war","ear","mpg","wmv","mpeg","scm","iso","dmp","dll","cab","so","avi","bin","exe","iso","tar","png","pdf","ps","mp3","zip","rar","gz")
360362

361363
# Standard getaddrinfo response for raw IP addresses ((None,) -> ('ip', port))
362-
RAW_IP_ADDR_INFO = [[2, 1, 6, '', (None,)], [2, 2, 17, '', (None,)], [2, 3, 0, '', (None,)]]
364+
RAW_IP_ADDR_INFO = [
365+
[_socket.AF_INET, _socket.SOCK_STREAM, socket.SOL_TCP, '', (None,)],
366+
[_socket.AF_INET, _socket.SOCK_DGRAM, socket.SOL_UDP, '', (None,)],
367+
[_socket.AF_INET, _socket.SOCK_RAW, socket.SOL_IP, '', (None,)]
368+
]

0 commit comments

Comments
 (0)