Resolve potential bug in MOTD in Docker (#2331)
* Resolve potential bug in MOTD in Docker
This commit is contained in:
parent
f641830d26
commit
19f6544923
|
@ -64,8 +64,10 @@ class MOTDTTY(MOTD):
|
||||||
self.set_variables()
|
self.set_variables()
|
||||||
|
|
||||||
def set_variables(self): # no cov
|
def set_variables(self): # no cov
|
||||||
fallback = (80, 24)
|
fallback = (108, 24)
|
||||||
terminal_width = min(get_terminal_size(fallback=fallback).columns, 108)
|
terminal_width = max(
|
||||||
|
get_terminal_size(fallback=fallback).columns, fallback[0]
|
||||||
|
)
|
||||||
self.max_value_width = terminal_width - fallback[0] + 36
|
self.max_value_width = terminal_width - fallback[0] + 36
|
||||||
|
|
||||||
self.key_width = 4
|
self.key_width = 4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user