Including pyaml's Loader to suppress warnings

See these docs for info: https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
pull/82/head
arcsector 2020-05-06 16:58:21 -07:00 committed by GitHub
parent 2300977908
commit c86e4940af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
from cabby import create_client
from pyaml import yaml
from yaml import Loader
import pytz
import argparse
import os
@ -51,14 +52,14 @@ config_file = "{}/remote-servers.yml".format(
log.debug("Opening config file %s", config_file)
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)
# Read in the local server configuration
local_config = "{}/local-server.yml".format(os.path.expanduser(args.configdir))
log.debug("Reading local server config")
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
log.info("Connecting to local server...")