easy-utils-dev 2.136__py3-none-any.whl → 2.137__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of easy-utils-dev might be problematic. Click here for more details.

easy_utils_dev/Events.py CHANGED
@@ -62,7 +62,7 @@ class EventEmitter:
62
62
  if event in self.listeners:
63
63
  self.listeners[event].remove(callback) # Remove the callback if it exists
64
64
 
65
- def dispatchEvent(self, event):
65
+ def dispatchEvent(self, event, data=None):
66
66
  """
67
67
  Triggers the specified event, executing all associated callback functions.
68
68
 
@@ -71,7 +71,7 @@ class EventEmitter:
71
71
  """
72
72
  if event in self.listeners:
73
73
  for callback in self.listeners[event]:
74
- callback() # Execute each callback associated with the event
74
+ callback(data) # Execute each callback associated with the event
75
75
 
76
76
  # Example of usage:
77
77
  if __name__ == '__main__':
@@ -151,7 +151,7 @@ class DEBUGGER:
151
151
  old = self.file_handler_class
152
152
  if old :
153
153
  self.logger.removeHandler(old)
154
- file_handler = RotatingFileHandler(path , maxBytes=self.LOG_SIZE_THRESHOLD_IN_BYTES , backupCount=self.BACKUP_COUNT )
154
+ file_handler = RotatingFileHandler(path , maxBytes=self.LOG_SIZE_THRESHOLD_IN_BYTES , backupCount=self.BACKUP_COUNT , delay=True )
155
155
  self.file_handler= file_handler.setFormatter(self.formatter)
156
156
  self.logger.addHandler(file_handler)
157
157
  return file_handler