Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix trac error when message is empty

  • Loading branch information...
commit cc653f9cfec4fb2f111e0a517dfc63f20992a489 1 parent a04cbfd
@dr4Ke authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 0.11/tracgitosis/tracgitosis.py
View
6 0.11/tracgitosis/tracgitosis.py
@@ -68,7 +68,8 @@ def render_preference_panel(self, req, panel):
if status != 0:
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)'))
message = 'return code: '+str(status)+'\nmessage:\n'+message
- add_warning(req, _(message))
+ if message:
+ add_warning(req, _(message))
sshkey = self.getsshkey(req, req.session.sid)
data['username'] = req.session.sid
data['sshkey'] = sshkey
@@ -180,7 +181,8 @@ def render_admin_panel(self, req, cat, page, path_info):
if status != 0:
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)'))
message = 'return code: '+str(status)+'\nmessage:\n'+message
- add_warning(req, _(message))
+ if message:
+ add_warning(req, _(message))
repo = replace(os.path.basename(self.config.get('trac', 'repository_dir')), '.git', '')
if req.method == 'POST':
config = {}
Please sign in to comment.
Something went wrong with that request. Please try again.