Upgrading to python3 (#60)

* Migrating to python 3.7.2, but docker image is not working properly.

Need to continue investigating why it's not properly running.

* Trying to fix the build and fixing logging in the scheduler initialization.

* Trying to fix the build

* Collecting test results

* Fixing the dockerfile

* Updating the development dependencies
This commit is contained in:
mtakaki
2019-02-22 02:17:13 -08:00
committed by GitHub
parent ea4b8ccd4e
commit 10e0141454
11 changed files with 44 additions and 34 deletions

View File

@@ -10,8 +10,8 @@ import requests
from yaml import dump
from yaml import load
import latency_unit
import status as st
import cachet_url_monitor.latency_unit as latency_unit
import cachet_url_monitor.status as st
# This is the mandatory fields that must be in the configuration file in this
# same exact structure.
@@ -80,7 +80,7 @@ class Configuration(object):
def __init__(self, config_file):
self.logger = logging.getLogger('cachet_url_monitor.configuration.Configuration')
self.config_file = config_file
self.data = load(file(self.config_file, 'r'))
self.data = load(open(self.config_file, 'r'))
self.current_fails = 0
self.trigger_update = True
@@ -146,7 +146,7 @@ class Configuration(object):
ConfigurationValidationError is raised. Otherwise nothing will happen.
"""
configuration_errors = []
for key, sub_entries in configuration_mandatory_fields.iteritems():
for key, sub_entries in configuration_mandatory_fields.items():
if key not in self.data:
configuration_errors.append(key)