Skip to content

Commit

Permalink
Removed compat.py and constants.py
Browse files Browse the repository at this point in the history
  • Loading branch information
back-to committed Dec 23, 2020
1 parent b7ed21f commit a5afb9a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 119 deletions.
2 changes: 1 addition & 1 deletion liveproxy/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
)

from liveproxy import __version__ as liveproxy_version
from liveproxy.constants import FILE_OUTPUT_LIST

_ip_address_re = re.compile(r'^((\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])$')

Expand All @@ -20,6 +19,7 @@ def ip_address(value):
raise ValueError

return match.group(0)
FILE_OUTPUT_LIST = ['.m3u', '.m3u8', '.new', '.txt']


def file_output_list(value):
Expand Down
60 changes: 0 additions & 60 deletions liveproxy/compat.py

This file was deleted.

48 changes: 0 additions & 48 deletions liveproxy/constants.py

This file was deleted.

1 change: 0 additions & 1 deletion liveproxy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from liveproxy import __version__ as liveproxy_version
from liveproxy.argparser import parser
from liveproxy.constants import FILE_OUTPUT_LIST
from liveproxy.server import (
HTTPRequest,
ThreadedHTTPServer,
Expand Down
13 changes: 4 additions & 9 deletions liveproxy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
from streamlink.stream.ffmpegmux import MuxedStream
from streamlink_cli.argparser import build_parser

from liveproxy.compat import (
BaseHTTPRequestHandler, HTTPServer, ThreadingMixIn,
is_py2, parse_qsl, unquote, urlparse
)
from liveproxy.constants import CONFIG_FILES, PLUGINS_DIR, STREAM_SYNONYMS
from http.server import BaseHTTPRequestHandler, HTTPServer
from socketserver import ThreadingMixIn
from urllib.parse import parse_qsl, unquote, urlparse

ACCEPTABLE_ERRNO = (
errno.ECONNABORTED,
Expand Down Expand Up @@ -576,7 +574,4 @@ class ThreadedHTTPServer(ThreadingMixIn, Server):
daemon_threads = True


__all__ = [
'HTTPRequest',
'ThreadedHTTPServer',
]
__all__ = ('HTTPRequest', 'ThreadedHTTPServer')

0 comments on commit a5afb9a

Please sign in to comment.