Skip to content

Commit

Permalink
BUG: Prompt utils is facing closing issues. Implemented a workaround …
Browse files Browse the repository at this point in the history
…for now
  • Loading branch information
vikashplus committed Dec 31, 2023
1 parent 65bb9d2 commit 1077f86
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion robohive/utils/prompt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ def prompt(data, color=None, on_color=None, flush=False, end="\n", type:Prompt=P

global PROMPT_CACHE

# Resolve if we need to print
# Why is cprint None during exit? HACK as a workaround for now
if cprint is None:
# cprint(data, color=color, on_color=on_color, flush=flush, end=end) # throws error
print(data, flush=flush, end=end)

# Why is Prompt None during exit? HACK as a workaround for now
if Prompt is None:
# print(Prompt.ONCE, "=============", type, flush=True) # throws error
print(data, flush=flush, end=end)
return

if type == Prompt.ONCE:
data_hash = hash(data)
if data_hash in PROMPT_CACHE:
Expand Down

0 comments on commit 1077f86

Please sign in to comment.