Skip to content

Commit

Permalink
Make sure that we can use gitosis as normal, until we want to use RSP…
Browse files Browse the repository at this point in the history
…/AMQP features
  • Loading branch information
Scott McWhirter committed Jan 25, 2010
1 parent 2bd36e7 commit 0b783f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gitosis/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def check_with_rsp(config, user, mode, path):
[rsp]
haveAccessURL = www.example.org
"""

if not config.has_section('rsp'):
return None

access_url = config.get('rsp', 'haveAccessURL')
if not access_url:
raise Exception("uh... not configured with an haveAccessURL yet, add it under an [rsp] section")
Expand Down
4 changes: 4 additions & 0 deletions gitosis/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def repository_path( cfg, user, command ):

## determines if we should send a message or not
def should_send_message( cfg, user, command ):

if not cfg.has_section('amqp'):
return False

if '\n' in command:
raise CommandMayNotContainNewlineError()
try:
Expand Down

0 comments on commit 0b783f4

Please sign in to comment.