Skip to content

Commit

Permalink
Fix exception name
Browse files Browse the repository at this point in the history
Fixes bug 939616

DataInvalid thrown by get_terminal_size is not a defined exception name
Also added details to Authors

Change-Id: Ia321d62d15b074aca69a5d0e5646966d7e297023
  • Loading branch information
derekhiggins committed Feb 23, 2012
1 parent 44461b4 commit f6e9199
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Authors
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion glance/common/animation.py
Expand Up @@ -116,7 +116,7 @@ def render(self):
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 + ' '
Expand Down
4 changes: 2 additions & 2 deletions glance/common/utils.py
Expand Up @@ -363,10 +363,10 @@ def _get_terminal_size_unknownOS():
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]

0 comments on commit f6e9199

Please sign in to comment.