Mercurial > kallithea
changeset 2505:02fc6ce0cd44 beta
don't make a api call after doing create_config
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 25 Jun 2012 23:08:06 +0200 |
parents | 4cf9af8ee623 |
children | 7e3e9d0c5575 |
files | rhodecode/bin/rhodecode_api.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/bin/rhodecode_api.py Mon Jun 25 22:58:33 2012 +0200 +++ b/rhodecode/bin/rhodecode_api.py Mon Jun 25 23:08:06 2012 +0200 @@ -142,7 +142,7 @@ if not method: raise Exception('please specify method name !') - id_ = random.randrange(1, 200) + id_ = random.randrange(1, 9999) req = urllib2.Request('%s/_admin/api' % apihost, data=json.dumps(_build_data(id_)), headers={'content-type': 'text/plain'}) @@ -221,6 +221,8 @@ apikey = args.apikey or conf['apikey'] host = args.apihost or conf['apihost'] method = args.method + if method == '_create_config': + sys.exit() margs = dict(map(lambda s: s.split(':', 1), other)) api_call(apikey, host, args.format, method, **margs)