Skip to content

Commit a4931e7

Browse files
authored
Merge pull request #449 from AutomationSolutionz/fix-prettify-limit-bug
If user set prettify limit to None, it is throwing error
2 parents a62d7ad + 940c8f4 commit a4931e7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Framework/Utilities/CommonUtil.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,11 @@ def prettify(key, val):
294294
except:
295295
val_output = str(val)
296296

297-
if len(val_output) > prettify_limit:
298-
val_output = f"{val_output[:prettify_limit]}\n...(truncated {len(val_output)-prettify_limit} chars)"
297+
if isinstance(prettify_limit, int):
298+
if len(val_output) > prettify_limit:
299+
val_output = f"{val_output[:prettify_limit]}\n...(truncated {len(val_output)-prettify_limit} chars)"
300+
else:
301+
val_output = str(val)
299302

300303
color = Fore.MAGENTA
301304
print(color + f"{key} = ", end="")

0 commit comments

Comments
 (0)