Fix #1484: trying to access the screen object when not using interactive mode

This commit is contained in:
Andrew Resch 2011-01-16 15:58:50 -08:00
parent 8c12c47d3e
commit b30499c6ac
1 changed files with 5 additions and 4 deletions

View File

@ -189,6 +189,7 @@ class Command(BaseCommand):
s += " %s" % (fp) s += " %s" % (fp)
# Check if this is too long for the screen and reduce the path # Check if this is too long for the screen and reduce the path
# if necessary # if necessary
if hasattr(self.console, "screen"):
cols = self.console.screen.cols cols = self.console.screen.cols
slen = colors.get_line_length(s, self.console.screen.encoding) slen = colors.get_line_length(s, self.console.screen.encoding)
if slen > cols: if slen > cols: