summaryrefslogtreecommitdiffstats
path: root/utils/opnfv-artifacts.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 14:37:05 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 16:58:05 +0100
commite73000209d46461b1196f560bf5c36bade020134 (patch)
tree6a09e8a127d777815378ef833824f924df82875c /utils/opnfv-artifacts.py
parente5f30e9839c4e36d7712b0e7dd3c319a85048322 (diff)
Fix flake8 violations in releng
Change-Id: I45769ff9c9db2de9fbba69117a92de414dd7f651 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'utils/opnfv-artifacts.py')
-rw-r--r--utils/opnfv-artifacts.py79
1 files changed, 39 insertions, 40 deletions
diff --git a/utils/opnfv-artifacts.py b/utils/opnfv-artifacts.py
index 876efedba..2f2cc41ba 100644
--- a/utils/opnfv-artifacts.py
+++ b/utils/opnfv-artifacts.py
@@ -28,56 +28,55 @@ from apiclient.errors import HttpError
import argparse
import json
-import os
import sys
api = {
- 'projects': {},
- 'docs': {},
- 'releases': {},
+ 'projects': {},
+ 'docs': {},
+ 'releases': {},
}
releases = [
- 'arno.2015.1.0',
- 'arno.2015.2.0',
- 'brahmaputra.1.0',
+ 'arno.2015.1.0',
+ 'arno.2015.2.0',
+ 'brahmaputra.1.0',
]
# List of file extensions to filter out
ignore_extensions = [
- '.buildinfo',
- '.woff',
- '.ttf',
- '.svg',
- '.eot',
- '.pickle',
- '.doctree',
- '.js',
- '.png',
- '.css',
- '.gif',
- '.jpeg',
- '.jpg',
- '.bmp',
+ '.buildinfo',
+ '.woff',
+ '.ttf',
+ '.svg',
+ '.eot',
+ '.pickle',
+ '.doctree',
+ '.js',
+ '.png',
+ '.css',
+ '.gif',
+ '.jpeg',
+ '.jpg',
+ '.bmp',
]
parser = argparse.ArgumentParser(
- description='OPNFV Artifacts JSON Generator')
+ description='OPNFV Artifacts JSON Generator')
parser.add_argument(
- '-k',
- dest='key',
- default='',
- help='API Key for Google Cloud Storage')
+ '-k',
+ dest='key',
+ default='',
+ help='API Key for Google Cloud Storage')
parser.add_argument(
- '-p',
- default=None,
- dest='pretty',
- action='store_const',
- const=2,
- help='pretty print the output')
+ '-p',
+ default=None,
+ dest='pretty',
+ action='store_const',
+ const=2,
+ help='pretty print the output')
# Parse and assign arguments
args = parser.parse_args()
@@ -130,7 +129,6 @@ def has_logs(gerrit_review):
return False
-
def has_ignorable_extension(filename):
for extension in ignore_extensions:
if filename.lower().endswith(extension):
@@ -148,11 +146,11 @@ def get_results(key):
files = storage.objects().list(bucket='artifacts.opnfv.org',
fields='nextPageToken,'
'items('
- 'name,'
- 'mediaLink,'
- 'updated,'
- 'contentType,'
- 'size'
+ 'name,'
+ 'mediaLink,'
+ 'updated,'
+ 'contentType,'
+ 'size'
')')
while (files is not None):
sites = files.execute()
@@ -173,7 +171,8 @@ def get_results(key):
project = site_split[0]
name = '/'.join(site_split[1:])
- proxy = "http://build.opnfv.org/artifacts.opnfv.org/%s" % site['name']
+ proxy = "http://build.opnfv.org/artifacts.opnfv.org/%s" % site[
+ 'name']
if name.endswith('.html'):
href = "http://artifacts.opnfv.org/%s" % site['name']
href_type = 'view'
@@ -183,7 +182,7 @@ def get_results(key):
gerrit = has_gerrit_review(site_split)
logs = False # has_logs(gerrit)
- documentation = has_documentation(site_split)
+ # documentation = has_documentation(site_split)
release = has_release(site_split)
category = 'project'