[flatpak] fix log

This commit is contained in:
Vinicius Moreira
2020-09-10 13:40:11 -03:00
parent 1c1aad1e0e
commit bd40d9f2a8
2 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import logging
import time
import traceback
from typing import Optional
import requests
import yaml
@@ -17,7 +18,7 @@ class HttpClient:
self.sleep = sleep
self.logger = logger
def get(self, url: str, params: dict = None, headers: dict = None, allow_redirects: bool = True, ignore_ssl: bool = False, single_call: bool = False, session: bool = True) -> requests.Response:
def get(self, url: str, params: dict = None, headers: dict = None, allow_redirects: bool = True, ignore_ssl: bool = False, single_call: bool = False, session: bool = True) -> Optional[requests.Response]:
cur_attempts = 1
while cur_attempts <= self.max_attempts:
@@ -44,7 +45,7 @@ class HttpClient:
return res
if single_call:
return
return res
if self.sleep > 0:
time.sleep(self.sleep)