1

fix: empty answer in svn command

This commit is contained in:
diSabler
2014-06-12 16:20:02 +04:00
parent 0cefbbad6a
commit c3c6630c6c

View File

@@ -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)
if verb: sh_exe = '%s -v\"' % sh_exe[:-1]
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)
if rpl: svn_log = svn_log.replace(rpl[0],'-'*3)
msg = 'SVN from %s\n%s' % (url,svn_log)