Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate yamlconfig #192

Merged
merged 2 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pytest_docker_tools==0.2.0
pytest==3.3
pytest-cov==2.6.0
pytest-twisted==1.8
codecov==2.0.15
pytest==5.4.1
pytest-cov==2.8.1
pytest-twisted==1.12
codecov==2.0.17
flake8==3.6.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ prometheus-client==0.0.19
pytz
pyvmomi>=6.5
twisted>=14.0.2
yamlconfig
pyyaml
service-identity
6 changes: 4 additions & 2 deletions vmware_exporter/vmware_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import pytz
import logging

from yamlconfig import YamlConfig
import yaml

# Twisted
from twisted.web.server import Site, NOT_DONE_YET
Expand Down Expand Up @@ -938,7 +938,9 @@ def __init__(self, args):
def configure(self, args):
if args.config_file:
try:
self.config = YamlConfig(args.config_file)
with open(args.config_file) as cf:
self.config = yaml.load(cf, Loader=yaml.FullLoader)

if 'default' not in self.config.keys():
logging.error("Error, you must have a default section in config file (for now)")
exit(1)
Expand Down