Fix query-zanata
Change 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.
@@ -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)
