Browse Source

update print, make pep8 happy

Change-Id: I8e432ad3d5d6d295d43c2f087f443f4dd32cb8e3
changes/39/699039/1
Weifan Fu 3 months ago
parent
commit
ece4660284
2 changed files with 7 additions and 7 deletions
  1. +3
    -3
      build_packages/is_version_bumped.py
  2. +4
    -4
      build_packages/update_wiki.py

+ 3
- 3
build_packages/is_version_bumped.py View File

@@ -26,9 +26,9 @@ if 'version' not in two_lines:
lines = str(two_lines).split('\n')
version1 = StrictVersion(lines[0].split('=')[1].strip())
version2 = StrictVersion(lines[1].split('=')[1].strip())
print ('version1: ', version1)
print ('version2: ', version2)
print('version1: ', version1)
print('version2: ', version2)
if version2 > version1:
print ('Version update correct.')
print('Version update correct.')
else:
sys.exit("new version string is < old version string. Build FAILED")

+ 4
- 4
build_packages/update_wiki.py View File

@@ -27,10 +27,10 @@ conf_user = sys.argv[1]
conf_token = sys.argv[2]
page_id = sys.argv[3]
html_href = sys.argv[4]
print ("page_id is: %(page_id)s" % {'page_id': page_id})
print ("html_href is: %(html_href)s" % {'html_href': html_href})
print("page_id is: %(page_id)s" % {'page_id': page_id})
print("html_href is: %(html_href)s" % {'html_href': html_href})
basic_auth = (conf_user, conf_token)
print ("basic_auth is %(auth)s" % {'auth': basic_auth})
print("basic_auth is %(auth)s" % {'auth': basic_auth})

headers = {'content-type': 'application/json'}

@@ -58,4 +58,4 @@ data = ('{"id":"%(page_id)s",'
'title': json_out['title']})

p = requests.put(url, data=data, headers=headers, auth=basic_auth)
print (p.json())
print(p.json())

Loading…
Cancel
Save