mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 17:34:14 +02:00
[common] refactoring: 'get_human_size_str' moved from 'system' to 'view_utils'
This commit is contained in:
@@ -7,6 +7,7 @@ import requests
|
||||
import yaml
|
||||
|
||||
from bauh.commons import system
|
||||
from bauh.commons.view_utils import get_human_size_str
|
||||
|
||||
|
||||
class HttpClient:
|
||||
@@ -102,7 +103,7 @@ class HttpClient:
|
||||
size = self.get_content_length_in_bytes(url, session)
|
||||
|
||||
if size:
|
||||
return system.get_human_size_str(size)
|
||||
return get_human_size_str(size)
|
||||
|
||||
def exists(self, url: str, session: bool = True, timeout: int = 5) -> bool:
|
||||
params = {'url': url, 'allow_redirects': True, 'verify': False, 'timeout': timeout}
|
||||
|
||||
Reference in New Issue
Block a user