##// END OF EJS Templates
merge with crew-stable
Alexis S. L. Carvalho -
r3906:1063a631 merge default
parent child Browse files
Show More
@@ -203,7 +203,7 b' def nl2br(text):'
203 return text.replace('\n', '<br/>\n')
203 return text.replace('\n', '<br/>\n')
204
204
205 def obfuscate(text):
205 def obfuscate(text):
206 text = unicode(text, 'utf-8', 'replace')
206 text = unicode(text, util._encoding, 'replace')
207 return ''.join(['&#%d;' % ord(c) for c in text])
207 return ''.join(['&#%d;' % ord(c) for c in text])
208
208
209 def domain(author):
209 def domain(author):
@@ -500,6 +500,9 b' def system(cmd, environ={}, cwd=None, on'
500 oldenv[k] = os.environ.get(k)
500 oldenv[k] = os.environ.get(k)
501 if cwd is not None:
501 if cwd is not None:
502 oldcwd = os.getcwd()
502 oldcwd = os.getcwd()
503 origcmd = cmd
504 if os.name == 'nt':
505 cmd = '"%s"' % cmd
503 try:
506 try:
504 for k, v in environ.iteritems():
507 for k, v in environ.iteritems():
505 os.environ[k] = py2shell(v)
508 os.environ[k] = py2shell(v)
@@ -507,7 +510,7 b' def system(cmd, environ={}, cwd=None, on'
507 os.chdir(cwd)
510 os.chdir(cwd)
508 rc = os.system(cmd)
511 rc = os.system(cmd)
509 if rc and onerr:
512 if rc and onerr:
510 errmsg = '%s %s' % (os.path.basename(cmd.split(None, 1)[0]),
513 errmsg = '%s %s' % (os.path.basename(origcmd.split(None, 1)[0]),
511 explain_exit(rc)[0])
514 explain_exit(rc)[0])
512 if errprefix:
515 if errprefix:
513 errmsg = '%s: %s' % (errprefix, errmsg)
516 errmsg = '%s: %s' % (errprefix, errmsg)
General Comments 0
You need to be logged in to leave comments. Login now