Show More
@@ -203,7 +203,7 b' def nl2br(text):' | |||
|
203 | 203 | return text.replace('\n', '<br/>\n') |
|
204 | 204 | |
|
205 | 205 | def obfuscate(text): |
|
206 |
text = unicode(text, |
|
|
206 | text = unicode(text, util._encoding, 'replace') | |
|
207 | 207 | return ''.join(['&#%d;' % ord(c) for c in text]) |
|
208 | 208 | |
|
209 | 209 | def domain(author): |
@@ -500,6 +500,9 b' def system(cmd, environ={}, cwd=None, on' | |||
|
500 | 500 | oldenv[k] = os.environ.get(k) |
|
501 | 501 | if cwd is not None: |
|
502 | 502 | oldcwd = os.getcwd() |
|
503 | origcmd = cmd | |
|
504 | if os.name == 'nt': | |
|
505 | cmd = '"%s"' % cmd | |
|
503 | 506 | try: |
|
504 | 507 | for k, v in environ.iteritems(): |
|
505 | 508 | os.environ[k] = py2shell(v) |
@@ -507,7 +510,7 b' def system(cmd, environ={}, cwd=None, on' | |||
|
507 | 510 | os.chdir(cwd) |
|
508 | 511 | rc = os.system(cmd) |
|
509 | 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 | 514 | explain_exit(rc)[0]) |
|
512 | 515 | if errprefix: |
|
513 | 516 | errmsg = '%s: %s' % (errprefix, errmsg) |
General Comments 0
You need to be logged in to leave comments.
Login now