Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more debug messages

  • Loading branch information...
commit 41befa933694b87b7ee3c18d5f19600453f0b1be 1 parent a5a4224
@dr4Ke authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 0.11/tracgitosis/tracgitosis.py
View
7 0.11/tracgitosis/tracgitosis.py
@@ -86,16 +86,18 @@ def getsshkey(self, req, username):
This function read the file keydir/<user>.pub in the local gitosis-admin working tree.
"""
- self.log.debug('get ' + username + ' public key')
+ self.log.debug('update admin repository')
result, message = gitpull(self.env.path+'/'+self.admrepo)
if result != 0:
add_warning('Admin repository update failed. Message: '+message)
keyfile = self.env.path+'/'+self.admrepo+'/keydir/'+username+'.pub'
if os.path.exists(keyfile):
+ self.log.debug('get ' + username + ' public key')
f = open(keyfile, 'r')
pubkey = f.readline()
f.close()
else:
+ self.log.debug(username + 'has no public key')
pubkey = ''
return pubkey
@@ -119,10 +121,11 @@ def setsshkey(self, req, username, key):
f.write(key+'\n')
f.close()
tracname = self.config.get('project', 'name')
- self.log.debug('set ' + username + ' public key')
+ self.log.debug('update admin repository')
result, message = gitpull(self.env.path+'/'+self.admrepo)
if result != 0:
add_warning('Admin repository update failed. Message: '+message)
+ self.log.debug('set ' + username + ' public key')
status, message = gitcommit(self.env.path+'/'+self.admrepo, relkeyfile, tracname)
if status == 0:
add_notice(req, _('Your preferences have been saved.'))
Please sign in to comment.
Something went wrong with that request. Please try again.