Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix trac error when message is empty

  • Loading branch information...
commit cc653f9cfec4fb2f111e0a517dfc63f20992a489 1 parent a04cbfd
Christophe Drevet authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 0.11/tracgitosis/tracgitosis.py
6 0.11/tracgitosis/tracgitosis.py
@@ -68,7 +68,8 @@ def render_preference_panel(self, req, panel):
68 68 if status != 0:
69 69 add_warning(req, _('Error while cloning gitosis-admin repository. Please check your settings and/or passphrase free connection to this repository for the user running trac (in most cases, the web server user)'))
70 70 message = 'return code: '+str(status)+'\nmessage:\n'+message
71   - add_warning(req, _(message))
  71 + if message:
  72 + add_warning(req, _(message))
72 73 sshkey = self.getsshkey(req, req.session.sid)
73 74 data['username'] = req.session.sid
74 75 data['sshkey'] = sshkey
@@ -180,7 +181,8 @@ def render_admin_panel(self, req, cat, page, path_info):
180 181 if status != 0:
181 182 add_warning(req, _('Error while cloning gitosis-admin repository. Please check your settings and/or passphrase free connection to this repository for the user running trac (in most cases, the web server user)'))
182 183 message = 'return code: '+str(status)+'\nmessage:\n'+message
183   - add_warning(req, _(message))
  184 + if message:
  185 + add_warning(req, _(message))
184 186 repo = replace(os.path.basename(self.config.get('trac', 'repository_dir')), '.git', '')
185 187 if req.method == 'POST':
186 188 config = {}

0 comments on commit cc653f9

Please sign in to comment.
Something went wrong with that request. Please try again.