File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -621,7 +621,7 @@ def get_local_time(self, location=None):
621
621
api_url = TIME_SERVICE % (aio_username , aio_key )
622
622
api_url += TIME_SERVICE_STRFTIME
623
623
try :
624
- response = requests .get (api_url )
624
+ response = requests .get (api_url , timeout = 10 )
625
625
if response .status_code != 200 :
626
626
raise ValueError (response .text )
627
627
if self ._debug :
@@ -798,7 +798,7 @@ def fetch(self, refresh_url=None):
798
798
print ("Retrieving data..." , end = '' )
799
799
self .neo_status ((100 , 100 , 0 )) # yellow = fetching data
800
800
gc .collect ()
801
- r = requests .get (self ._url , headers = self ._headers )
801
+ r = requests .get (self ._url , headers = self ._headers , timeout = 10 )
802
802
gc .collect ()
803
803
self .neo_status ((0 , 0 , 100 )) # green = got data
804
804
print ("Reply is OK!" )
You can’t perform that action at this time.
0 commit comments