Handle sparql http timeout issue

Authored by Lokal_Profil on Aug 12 2017, 4:09 AM.


Handle sparql http timeout issue

This is done by catching it, waiting, then trying again. On the second try
the sparql endpoint has already generated the result so the reply is fast.

A proposal for an upstream fix in pywikibot has been made in
https://gerrit.wikimedia.org/r/371697 but this is a stop-gap messure.

Bug: T172690
Change-Id: I7c9d8a213a595ac9adac335020cd1179c199fdda