diff options
author | Ben Mather <bwhmather@bwhmather.com> | 2014-09-30 08:07:40 +0100 |
---|---|---|
committer | Ben Mather <bwhmather@bwhmather.com> | 2014-09-30 08:11:46 +0100 |
commit | 2c79db52bcd4fceee17d94abd01b5dd49ef36b06 (patch) | |
tree | 74176d625c724904391640a607d2eb9c87c89a37 /source_control/github_hooks.py | |
parent | f6cd2d931ee192afefd3d7798c91b94a946a2d45 (diff) | |
download | ansible-modules-extras-2c79db52bcd4fceee17d94abd01b5dd49ef36b06.tar.gz |
mark list as private instead of shadowing
Diffstat (limited to 'source_control/github_hooks.py')
-rw-r--r-- | source_control/github_hooks.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source_control/github_hooks.py b/source_control/github_hooks.py index 0ca58796..878e3249 100644 --- a/source_control/github_hooks.py +++ b/source_control/github_hooks.py @@ -75,7 +75,7 @@ EXAMPLES = ''' - local_action: github_hooks action=cleanall user={{ gituser }} oauthkey={{ oauthkey }} repo={{ repo }} ''' -def list_(module, hookurl, oauthkey, repo, user): +def _list(module, hookurl, oauthkey, repo, user): url = "%s/hooks" % repo auth = base64.encodestring('%s:%s' % (user, oauthkey)).replace('\n', '') headers = { @@ -88,7 +88,7 @@ def list_(module, hookurl, oauthkey, repo, user): return False, response.read() def clean504(module, hookurl, oauthkey, repo, user): - current_hooks = list_(hookurl, oauthkey, repo, user)[1] + current_hooks = _list(hookurl, oauthkey, repo, user)[1] decoded = json.loads(current_hooks) for hook in decoded: @@ -100,7 +100,7 @@ def clean504(module, hookurl, oauthkey, repo, user): return 0, current_hooks def cleanall(module, hookurl, oauthkey, repo, user): - current_hooks = list_(hookurl, oauthkey, repo, user)[1] + current_hooks = _list(hookurl, oauthkey, repo, user)[1] decoded = json.loads(current_hooks) for hook in decoded: @@ -162,7 +162,7 @@ def main(): content_type = module.params['content_type'] if action == "list": - (rc, out) = list_(module, hookurl, oauthkey, repo, user) + (rc, out) = _list(module, hookurl, oauthkey, repo, user) if action == "clean504": (rc, out) = clean504(module, hookurl, oauthkey, repo, user) |