Commit 01b27ea5 authored by Michal Čihař's avatar Michal Čihař

Define timeout for machine translations

We don't want to wait too long for them

Fixes #445
parent 5ac712d7
...@@ -83,6 +83,7 @@ class MachineTranslation(object): ...@@ -83,6 +83,7 @@ class MachineTranslation(object):
# Create request object with custom headers # Create request object with custom headers
request = urllib2.Request(url) request = urllib2.Request(url)
request.timeout = 0.5
request.add_header('User-Agent', 'Weblate/%s' % weblate.VERSION) request.add_header('User-Agent', 'Weblate/%s' % weblate.VERSION)
# Optional authentication # Optional authentication
if not skip_auth: if not skip_auth:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment