Code formatting.

This commit is contained in:
Bastian Kleineidam 2013-04-13 08:00:11 +02:00
parent 522af89af5
commit c246b41d64

View file

@ -116,6 +116,8 @@ def backtick (cmd, encoding='utf-8'):
"""Return decoded output from command."""
data = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
return data.decode(encoding)
def unicode_safe(text, encoding=UrlEncoding, errors='ignore'):
"""Decode text to Unicode if not already done."""
try: