Fix query-zanata
Change I2d1638296f264784333ba1745f75490d81b9ca00 overwrote the content flag and now the script does not return JSON as expected but XML. Change it to continue returning JSON. Also, use newer ProjectVersionResource REST API since the old one is deprecated. Change-Id: Idf493813d20d40cc92aaaffbe23db227eb1a213a
This commit is contained in:
parent
7127a4064e
commit
47f41491d7
|
@ -36,10 +36,11 @@ def main():
|
|||
args = get_args()
|
||||
zc = IniConfig(os.path.expanduser('~/.config/zanata.ini'))
|
||||
rest_service = ZanataRestService(zc, content_type='application/json',
|
||||
accept='application/json',
|
||||
verify=args.verify)
|
||||
try:
|
||||
r = rest_service.query(
|
||||
'/rest/projects/p/%s/iterations/i/%s'
|
||||
'/rest/project/%s/version/%s'
|
||||
% (args.project, args.version))
|
||||
except ValueError:
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Reference in New Issue