Skip to content

Commit 8ab3849

Browse files
Aiohttp: minor optimisation
1 parent 17a58d3 commit 8ab3849

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frameworks/Python/aiohttp/app/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
def get_num_queries(request):
2727
try:
28-
num_queries = int(request.match_info.get('queries', 1))
29-
except ValueError:
28+
num_queries = int(request.match_info['queries'])
29+
except (KeyError, ValueError):
3030
return 1
3131
if num_queries < 1:
3232
return 1

0 commit comments

Comments
 (0)