diff --git a/rhodecode/bin/base.py b/rhodecode/bin/base.py --- a/rhodecode/bin/base.py +++ b/rhodecode/bin/base.py @@ -1,6 +1,28 @@ +# -*- coding: utf-8 -*- +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . """ +rhodecode.bin.base +~~~~~~~~~~~~~~~~~~ + Base utils for shell scripts + +:created_on: May 09, 2013 +:author: marcink +:copyright: (c) 2013 RhodeCode GmbH. +:license: GPLv3, see LICENSE for more details. """ + import os import sys import random @@ -46,7 +68,7 @@ def api_call(apikey, apihost, method=Non if not method: raise Exception('please specify method name !') - + apihost = apihost.rstrip('/') id_ = random.randrange(1, 9999) req = urllib2.Request('%s/_admin/api' % apihost, data=json.dumps(_build_data(id_)),