aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNguyen Hung Phuong <phuongnh@vn.fujitsu.com>2016-09-12 15:15:21 +0700
committerNguyen Hung Phuong <phuongnh@vn.fujitsu.com>2016-09-12 15:17:28 +0700
commit253692630f156e81a7ea33d1fa9fc3708939a9c0 (patch)
tree3d4e24847c53a15d674e2f27949f88c8b08bba2c /tools
parent8c0f8daa22e3163041fc2bb5cd1ba5939247e600 (diff)
downloadkolla-253692630f156e81a7ea33d1fa9fc3708939a9c0.tar.gz
kolla-253692630f156e81a7ea33d1fa9fc3708939a9c0.zip
Clean imports in code
In some part in the code we import objects. In the Openstack style guidelines they recommend to import only modules. http://docs.openstack.org/developer/hacking/#imports Change-Id: I4b55cae8c2672f82025a95112b14d441d66f9d6d
Diffstat (limited to 'tools')
-rwxr-xr-xtools/version-check.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/version-check.py b/tools/version-check.py
index a20d14b79..9477762b0 100755
--- a/tools/version-check.py
+++ b/tools/version-check.py
@@ -18,10 +18,10 @@ import os
import re
import sys
-from bs4 import BeautifulSoup as bs
+import bs4
from oslo_config import cfg
import pkg_resources
-from prettytable import PrettyTable
+import prettytable
import requests
PROJECT_ROOT = os.path.abspath(os.path.join(
@@ -58,7 +58,7 @@ def retrieve_upstream_versions():
LOG.debug("Getting latest version for project %s from %s",
project, base)
r = requests.get(base)
- s = bs(r.text, 'html.parser')
+ s = bs4.BeautifulSoup(r.text, 'html.parser')
for link in s.find_all('a'):
version = link.get('href')
@@ -119,8 +119,8 @@ def diff_link(project, old_ref, new_ref):
def compare_versions():
up_to_date = True
- result = PrettyTable(["Project", "Current version",
- "Latest version", "Comparing changes"])
+ result = prettytable.PrettyTable(["Project", "Current version",
+ "Latest version", "Comparing changes"])
result.align = "l"
for project in VERSIONS['upstream']: