mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 16:08:40 +00:00
Fix #1484: trying to access the screen object when not using interactive mode
This commit is contained in:
parent
82fbbad385
commit
4d2a0b1856
1 changed files with 5 additions and 4 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue