Skip to content

Commit

Permalink
use self.debug for init decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Jan 17, 2025
1 parent 905e2bc commit 65b0dc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pysquared/pysquared.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ def error_print(self, statement: Any) -> None:
if self.debug:
print(co("[pysquared]" + str(statement), "red", "bold"))

def safe_init(error_severity="ERROR", debug=True):
def safe_init(error_severity="ERROR"):
def decorator(func: Callable[..., Any]):
def wrapper(self, *args, **kwargs):
hardware_key: str = kwargs.get("hardware_key", "UNKNOWN")
if debug:
if self.debug:
self.debug_print(f"Initializing {hardware_key}")

try:
Expand Down

0 comments on commit 65b0dc8

Please sign in to comment.