fix: empty answer in svn command
This commit is contained in:
@@ -43,7 +43,7 @@ def svn_get(type, jid, nick,text):
|
|||||||
sh_exe = 'sh -c \"LANG=%s svn log %s --limit %s\"' % (L('en_EN.UTF8','%s/%s'%(jid,nick)),url,count)
|
sh_exe = 'sh -c \"LANG=%s svn log %s --limit %s\"' % (L('en_EN.UTF8','%s/%s'%(jid,nick)),url,count)
|
||||||
if verb: sh_exe = '%s -v\"' % sh_exe[:-1]
|
if verb: sh_exe = '%s -v\"' % sh_exe[:-1]
|
||||||
svn_log = shell_execute(sh_exe,'%s/%s'%(jid,nick)).replace('\n\n','\n')
|
svn_log = shell_execute(sh_exe,'%s/%s'%(jid,nick)).replace('\n\n','\n')
|
||||||
while svn_log[-1] in ['-','\n']: svn_log = svn_log[:-1]
|
while svn_log and svn_log[-1] in ['-','\n']: svn_log = svn_log[:-1]
|
||||||
rpl = re.findall('-{10,}',svn_log)
|
rpl = re.findall('-{10,}',svn_log)
|
||||||
if rpl: svn_log = svn_log.replace(rpl[0],'-'*3)
|
if rpl: svn_log = svn_log.replace(rpl[0],'-'*3)
|
||||||
msg = 'SVN from %s\n%s' % (url,svn_log)
|
msg = 'SVN from %s\n%s' % (url,svn_log)
|
||||||
|
|||||||
Reference in New Issue
Block a user