Skip to content

Commit 965fe01

Browse files
committed
don't print exception message if it's a null string.
1 parent ee4555d commit 965fe01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/panxapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def print_status(xapi, action, exception_msg=None):
491491
code = ''
492492
if xapi.status is not None:
493493
print(': %s%s' % (xapi.status, code), end='', file=sys.stderr)
494-
if exception_msg is not None:
494+
if exception_msg is not None and str(exception_msg):
495495
print(': "%s"' % exception_msg, end='', file=sys.stderr)
496496
elif xapi.status_detail is not None:
497497
print(': "%s"' % xapi.status_detail, end='', file=sys.stderr)

0 commit comments

Comments
 (0)