mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 10:36:52 -07:00
Refactor network utils to utils.network
This commit is contained in:
parent
0f7c74dd78
commit
dade3f6698
1 changed files with 0 additions and 11 deletions
|
@ -410,14 +410,3 @@ def find_imdbid(dir_name, input_name, omdb_api_key):
|
|||
|
||||
logger.warning('Unable to find a imdbID for {0}'.format(input_name))
|
||||
return imdbid
|
||||
|
||||
|
||||
def server_responding(base_url):
|
||||
logger.debug('Attempting to connect to server at {0}'.format(base_url), 'SERVER')
|
||||
try:
|
||||
requests.get(base_url, timeout=(60, 120), verify=False)
|
||||
logger.debug('Server responded at {0}'.format(base_url), 'SERVER')
|
||||
return True
|
||||
except (requests.ConnectionError, requests.exceptions.Timeout):
|
||||
logger.error('Server failed to respond at {0}'.format(base_url), 'SERVER')
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue