have wiki-upload report on the warnings of the wiki
This commit is contained in:
parent
2bfa3ee3ae
commit
4983ff09c0
1 changed files with 6 additions and 2 deletions
|
@ -53,10 +53,14 @@ def main():
|
||||||
for image in args.images:
|
for image in args.images:
|
||||||
destination_name = os.path.basename(image)
|
destination_name = os.path.basename(image)
|
||||||
|
|
||||||
print('Uploading {} ... '.format(destination_name), end='')
|
print('Uploading {} ... '.format(destination_name))
|
||||||
ret = site.upload(open(image), destination_name, args.description)
|
ret = site.upload(open(image), destination_name, args.description)
|
||||||
|
|
||||||
color = 'green' if ret['result'] == 'Success' else 'yellow'
|
color = 'green' if ret['result'] == 'Success' else 'yellow'
|
||||||
print(termcolor.colored(ret['result'], color))
|
print(termcolor.colored(' {}'.format(ret['result']), color))
|
||||||
|
if 'warnings' in ret:
|
||||||
|
for warning, what in ret['warnings'].items():
|
||||||
|
print(termcolor.colored(' {}: {}'.format(warning, what),
|
||||||
|
'yellow'))
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue