changeset 3097:db1b7125cdaf beta

fixed issue with passing IP address to log action logger for git
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 13 Dec 2012 22:30:17 +0100
parents 69b25f1b0b45
children a5f0bc867edc fd93dfa03d9b
files rhodecode/lib/hooks.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/hooks.py	Thu Dec 13 14:38:45 2012 +0100
+++ b/rhodecode/lib/hooks.py	Thu Dec 13 22:30:17 2012 +0100
@@ -159,16 +159,18 @@
         repository = extras['repository']
         scm = extras['scm']
         make_lock = extras['make_lock']
+        ip = extras['ip']
     elif 'username' in rc_extras:
         username = rc_extras['username']
         repository = rc_extras['repository']
         scm = rc_extras['scm']
         make_lock = rc_extras['make_lock']
+        ip = rc_extras['ip']
     else:
         raise Exception('Missing data in repo.ui and os.environ')
     user = User.get_by_username(username)
     action = 'pull'
-    action_logger(user, action, repository, extras['ip'], commit=True)
+    action_logger(user, action, repository, ip, commit=True)
     # extension hook call
     from rhodecode import EXTENSIONS
     callback = getattr(EXTENSIONS, 'PULL_HOOK', None)