Removed unused imports; whitespace normalization
Change-Id: I5e66c170e37f1382ec500cd6ae4a71435de7929f
diff --git a/kong/common/http.py b/kong/common/http.py
index 47ac058..d7f4a48 100644
--- a/kong/common/http.py
+++ b/kong/common/http.py
@@ -14,7 +14,6 @@
self.base_url = "http://%s:%s/%s" % (host, port, base_url)
def poll_request(self, method, url, check_response, **kwargs):
-
timeout = kwargs.pop('timeout', 180)
interval = kwargs.pop('interval', 2)
# Start timestamp
@@ -29,15 +28,13 @@
time.sleep(interval)
def poll_request_status(self, method, url, status=200, **kwargs):
-
def check_response(resp, body):
return resp['status'] == str(status)
self.poll_request(method, url, check_response, **kwargs)
-
def request(self, method, url, **kwargs):
- # Default to management_url, but can be overridden here
+ # Default to management_url, but can be overridden here
# (for auth requests)
base_url = kwargs.get('base_url', self.management_url)
diff --git a/kong/nova.py b/kong/nova.py
index 41b4b4e..bb40d59 100644
--- a/kong/nova.py
+++ b/kong/nova.py
@@ -1,6 +1,4 @@
import json
-import logging
-import subprocess
import kong.common.http
from kong import exceptions
@@ -24,7 +22,7 @@
self.user = user
self.api_key = api_key
self.project_id = project_id
- # Default to same as base_url, but will be change on auth
+ # Default to same as base_url, but will be changed for auth
self.management_url = self.base_url
def authenticate(self, user, api_key, project_id):
@@ -104,7 +102,7 @@
project_id = kwargs.get('project_id', self.project_id)
headers['X-Auth-Token'] = self.authenticate(self.user, self.api_key,
- self.project_id)
+ project_id)
kwargs['headers'] = headers
return super(API, self).request(method, url, **kwargs)
diff --git a/kong/run_tests.py b/kong/run_tests.py
index 091dce4..57a8253 100644
--- a/kong/run_tests.py
+++ b/kong/run_tests.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
-import gettext
import heapq
import os
import unittest
diff --git a/kong/tests/test_images.py b/kong/tests/test_images.py
index 0a9b682..e0e22fa 100644
--- a/kong/tests/test_images.py
+++ b/kong/tests/test_images.py
@@ -89,7 +89,7 @@
def setUp(self):
super(TestGlanceAPI, self).setUp()
self.base_url = "http://%s:%s/%s/images" % (self.glance['host'],
- self.glance['port'],
+ self.glance['port'],
self.glance['apiver'])
def test_upload_ami_style_image(self):