Fix exception name
Fixes bug 939616 DataInvalid thrown by get_terminal_size is not a defined exception name Also added details to Authors Change-Id: Ia321d62d15b074aca69a5d0e5646966d7e297023
This commit is contained in:
parent
44461b41f4
commit
f6e91994f9
1
Authors
1
Authors
@ -10,6 +10,7 @@ Chuck Short <chuck.short@canonical.com>
|
||||
Cory Wright <corywright@gmail.com>
|
||||
Dan Prince <dprince@redhat.com>
|
||||
Dean Troyer <dtroyer@gmail.com>
|
||||
Derek Higgins <derekh@redhat.com>
|
||||
Donal Lafferty <donal.lafferty@citrix.com>
|
||||
Eldar Nugaev <enugaev@griddynamics.com>
|
||||
Eoghan Glynn <eglynn@redhat.com>
|
||||
|
@ -116,7 +116,7 @@ class UploadProgressStatus(threading.Thread):
|
||||
sys.stdout.write(bar + padding + rate + eta)
|
||||
sys.stdout.flush()
|
||||
|
||||
except (exception.DataInvalid, NotImplementedError):
|
||||
except (exception.Invalid, NotImplementedError):
|
||||
|
||||
sys.stdout.write("\b" * 6) # use the len of [%3d%%]
|
||||
percent = (str_percent + ' '
|
||||
|
@ -363,10 +363,10 @@ def get_terminal_size():
|
||||
height_width = func.get(platform.os.name, _get_terminal_size_unknownOS)()
|
||||
|
||||
if height_width == None:
|
||||
raise exception.DataInvalid()
|
||||
raise exception.Invalid()
|
||||
|
||||
for i in height_width:
|
||||
if not isinstance(i, int) or i <= 0:
|
||||
raise exception.DataInvalid()
|
||||
raise exception.Invalid()
|
||||
|
||||
return height_width[0], height_width[1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user