Skip to content

Commit 904ec3b

Browse files
committed
Added missing arg check to log.debug()
1 parent d715268 commit 904ec3b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

  • remove-json-keys/src/remove_json_keys/lib
  • translate-messages/src/translate_messages/lib

remove-json-keys/src/remove_json_keys/lib/log.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
)
1919

2020
def data(msg, *args, **kwargs) : print(f'\n{colors.bw}{msg.format(*args, **kwargs)}{colors.nc}')
21-
def debug(msg, *args, **kwargs) : print(f'\n{colors.by}DEBUG: {msg.format(*args, **kwargs)}{colors.nc}')
21+
def debug(msg, *args, **kwargs):
22+
if '--debug' in sys.argv : print(f'\n{colors.by}DEBUG: {msg.format(*args, **kwargs)}{colors.nc}')
2223
def dim(msg, *args, **kwargs) : print(f'\n{colors.gry}{msg.format(*args, **kwargs)}{colors.nc}')
2324
def error(msg, *args, **kwargs) : print(f'\n{colors.br}ERROR: {msg.format(*args, **kwargs)}{colors.nc}')
2425
def info(msg, *args, end='', **kwargs) : print(f'\n{colors.by}{msg.format(*args, **kwargs)}{colors.nc}', end=end)

translate-messages/src/translate_messages/lib/log.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
)
1919

2020
def data(msg, *args, **kwargs) : print(f'\n{colors.bw}{msg.format(*args, **kwargs)}{colors.nc}')
21-
def debug(msg, *args, **kwargs) : print(f'\n{colors.by}DEBUG: {msg.format(*args, **kwargs)}{colors.nc}')
21+
def debug(msg, *args, **kwargs):
22+
if '--debug' in sys.argv : print(f'\n{colors.by}DEBUG: {msg.format(*args, **kwargs)}{colors.nc}')
2223
def dim(msg, *args, **kwargs) : print(f'\n{colors.gry}{msg.format(*args, **kwargs)}{colors.nc}')
2324
def error(msg, *args, **kwargs) : print(f'\n{colors.br}ERROR: {msg.format(*args, **kwargs)}{colors.nc}')
2425
def info(msg, *args, end='', **kwargs) : print(f'\n{colors.by}{msg.format(*args, **kwargs)}{colors.nc}', end=end)

0 commit comments

Comments
 (0)