Skip to content

Commit

Permalink
Remove not needed messages from log. (openvinotoolkit#53)
Browse files Browse the repository at this point in the history
* Remove not needed messages from log.

* Bandit fix.
  • Loading branch information
popovaan authored Apr 5, 2024
1 parent 58e16c2 commit 80088ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/backend/backend_ga.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def send(self, message: Message):

request.urlopen(req) #nosec
except Exception as err:
log.warning("Failed to send event with the following error: {}".format(err))
pass # nosec

def build_event_message(self, event_category: str, event_action: str, event_label: str, event_value: int = 1,
**kwargs):
Expand Down
2 changes: 1 addition & 1 deletion src/backend/backend_ga4.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def send(self, message: dict):

request.urlopen(req) #nosec
except Exception as err:
log.warning("Failed to send event with the following error: {}".format(err))
pass # nosec

def build_event_message(self, event_category: str, event_action: str, event_label: str, event_value: int = 1,
**kwargs):
Expand Down
1 change: 0 additions & 1 deletion src/utils/cid.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def save_cid_to_file(file_name: str, cid: str):
with open(file_name, 'w') as file:
file.write(cid)
except Exception as e:
log.warning("Failed to generate the client ID file: {}".format(str(e)))
return False
return True

Expand Down
4 changes: 2 additions & 2 deletions src/utils/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _future_callback(future):
fut = self.executor.submit(backend.send, message)
fut.add_done_callback(_future_callback)
except Exception as err:
log.warning("Failed to send event with error {}.".format(err))
pass # nosec

def force_shutdown(self, timeout: float):
"""
Expand All @@ -61,4 +61,4 @@ def force_shutdown(self, timeout: float):
self.executor._threads.clear()
futures.thread._threads_queues.clear()
except Exception as err:
log.warning("Failed to clear threads queue with the following error: {}".format(err))
pass # nosec

0 comments on commit 80088ba

Please sign in to comment.