mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
Use YAML instead of JSON
Add PyYAML<=3.13 dependency.
This commit is contained in:
parent
6e6b43eb79
commit
878ab0977f
1
setup.py
1
setup.py
@ -33,6 +33,7 @@ deps = [
|
||||
'PySocks>=1.6.8',
|
||||
'cryptography>=2.3',
|
||||
'idna>=2.5',
|
||||
'PyYAML<=3.13',
|
||||
]
|
||||
try:
|
||||
import concurrent.futures
|
||||
|
@ -29,7 +29,6 @@ try:
|
||||
except ImportError:
|
||||
import Queue as queue
|
||||
|
||||
import json
|
||||
import logging
|
||||
import logging.config
|
||||
import sys
|
||||
@ -41,6 +40,7 @@ import traceback
|
||||
import signal
|
||||
import threading
|
||||
import certauth.certauth
|
||||
import yaml
|
||||
import warcprox
|
||||
import doublethink
|
||||
import cryptography.hazmat.backends.openssl
|
||||
@ -243,7 +243,7 @@ def _build_arg_parser(prog='warcprox', show_hidden=False):
|
||||
help='very verbose logging')
|
||||
arg_parser.add_argument(
|
||||
'--logging-conf-file', dest='logging_conf_file', default=None,
|
||||
help=('reads logging configuration from a JSON file'))
|
||||
help=('reads logging configuration from a YAML file'))
|
||||
arg_parser.add_argument(
|
||||
'--version', action='version',
|
||||
version="warcprox {}".format(warcprox.__version__))
|
||||
@ -309,7 +309,7 @@ def main(argv=None):
|
||||
|
||||
if args.logging_conf_file:
|
||||
with open(args.logging_conf_file, 'r') as fd:
|
||||
conf = json.load(fd)
|
||||
conf = yaml.load(fd)
|
||||
logging.config.dictConfig(conf)
|
||||
|
||||
# see https://github.com/pyca/cryptography/issues/2911
|
||||
|
Loading…
x
Reference in New Issue
Block a user