Skip to content

Commit

Permalink
Add a default for request.args.get
Browse files Browse the repository at this point in the history
And, just for the heck of it, catch TypeError anyway.  Fixes #3107.
  • Loading branch information
djmitche committed Dec 12, 2014
1 parent 58178c2 commit 72f79a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions master/buildbot/status/web/slaves.py
Expand Up @@ -114,8 +114,8 @@ def content(self, request, ctx):
current_builds.append(self.get_line_values(request, cb))

try:
max_builds = int(request.args.get('numbuilds')[0])
except ValueError:
max_builds = int(request.args.get('numbuilds', ['10'])[0])
except (TypeError, ValueError):
max_builds = 10

recent_builds = []
Expand Down

0 comments on commit 72f79a8

Please sign in to comment.