Skip to content

Commit 65893ba

Browse files
committed
Default to lang=en only when getting top pages in stress test.
1 parent 890470e commit 65893ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/stress.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def main(args):
9090
GET top pages or random pages forever
9191
"""
9292
delay = args.delay
93-
lang = args.lang or 'en'
93+
lang = args.lang
9494
top = args.top
9595

9696
start = int(time.time())
@@ -108,6 +108,9 @@ def main(args):
108108

109109
while len(pages) > 0:
110110
language = lang or random.choice(languages())
111+
if top and not lang:
112+
language = 'en'
113+
111114
page = wptools.page(lang=language, silent=True)
112115
if top:
113116
page = wptools.page(pages.pop(0), lang=language, silent=True)

0 commit comments

Comments
 (0)