Skip to content

Commit

Permalink
Upgrade to python3
Browse files Browse the repository at this point in the history
  • Loading branch information
vsivaraja committed Oct 3, 2017
1 parent 828b69b commit 05093bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions grift/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import requests
import six


@six.add_metaclass(ABCMeta)
class AbstractLoader(object):
"""Base class for loading configuration settings from a source"""
pass

def reload(self):
"""Reload values from the designated source, if possible"""
Expand Down Expand Up @@ -144,7 +144,7 @@ def _fetch_secrets(vault_url, path, token):
resp.raise_for_status()
data = resp.json()
if data.get('errors'):
raise VaultException(six.u('Error fetching Vault secrets from path {}: {}')
raise VaultException('Error fetching Vault secrets from path {}: {}'
.format(path, data['errors']))
return data['data']

Expand All @@ -156,7 +156,7 @@ def _fetch_app_role_token(vault_url, role_id, secret_id):
resp.raise_for_status()
data = resp.json()
if data.get('errors'):
raise VaultException(six.u('Error fetching Vault token: {}'.format(data['errors'])))
raise VaultException('Error fetching Vault token: {}'.format(data['errors']))
return data['auth']['client_token']

def reload(self):
Expand All @@ -170,7 +170,7 @@ def lookup_token(self):
resp.raise_for_status()
data = resp.json()
if data.get('errors'):
raise VaultException(six.u('Error looking up Vault token: {}'.format(data['errors'])))
raise VaultException('Error looking up Vault token: {}'.format(data['errors']))
return data

def renew_token(self):
Expand All @@ -180,7 +180,7 @@ def renew_token(self):
resp.raise_for_status()
data = resp.json()
if data.get('errors'):
raise VaultException(six.u('Error renewing Vault token: {}'.format(data['errors'])))
raise VaultException('Error renewing Vault token: {}'.format(data['errors']))
return data


Expand Down
2 changes: 1 addition & 1 deletion grift/tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 2017 Kensho Technologies, Inc.
import os
import six
from unittest import TestCase

from schematics.exceptions import ConversionError
from schematics.types import StringType, IntType
import six

from grift.config import BaseConfig, ConfigProperty
from grift.loaders import DictLoader, EnvLoader, JsonFileLoader
Expand Down

0 comments on commit 05093bc

Please sign in to comment.