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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user