Including pyaml's Loader to suppress warnings
See these docs for info: https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecationpull/82/head
parent
2300977908
commit
c86e4940af
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
from cabby import create_client
|
from cabby import create_client
|
||||||
from pyaml import yaml
|
from pyaml import yaml
|
||||||
|
from yaml import Loader
|
||||||
import pytz
|
import pytz
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
|
@ -51,14 +52,14 @@ config_file = "{}/remote-servers.yml".format(
|
||||||
|
|
||||||
log.debug("Opening config file %s", config_file)
|
log.debug("Opening config file %s", config_file)
|
||||||
with open(config_file, "r") as f:
|
with open(config_file, "r") as f:
|
||||||
config = yaml.load(f.read())
|
config = yaml.load(f.read(), Loader=Loader)
|
||||||
log.debug("Config read %s", config)
|
log.debug("Config read %s", config)
|
||||||
|
|
||||||
# Read in the local server configuration
|
# Read in the local server configuration
|
||||||
local_config = "{}/local-server.yml".format(os.path.expanduser(args.configdir))
|
local_config = "{}/local-server.yml".format(os.path.expanduser(args.configdir))
|
||||||
log.debug("Reading local server config")
|
log.debug("Reading local server config")
|
||||||
with open(local_config, "r") as f:
|
with open(local_config, "r") as f:
|
||||||
local_config = yaml.load(f.read())
|
local_config = yaml.load(f.read(), Loader=Loader)
|
||||||
|
|
||||||
# Attempt to make contact with the local server
|
# Attempt to make contact with the local server
|
||||||
log.info("Connecting to local server...")
|
log.info("Connecting to local server...")
|
||||||
|
|
Loading…
Reference in New Issue