Merge with master

This commit is contained in:
ibuler
2016-10-28 15:09:38 +08:00
parent 374dfbdac2
commit 92251f2a45
4 changed files with 8 additions and 20 deletions

View File

@@ -82,7 +82,10 @@ class CommandLog(models.Model):
@property
def output_decode(self):
return base64.b64decode(self.output).replace('\n', '<br />')
try:
return base64.b64decode(self.output).replace('\n', '<br />')
except UnicodeDecodeError:
return 'UnicodeDecodeError'
class Meta:
db_table = 'command_log'