8000 Don’t add notes to errors if they DNE. (in output) · kayarre/python-api@6b53e44 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b53e44

Browse files
committed
Don’t add notes to errors if they DNE. (in output)
1 parent b89be4e commit 6b53e44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plotly/exceptions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ def __str__(self):
103103
'path': '[' + ']['.join(repr(k) for k in self.path) + ']',
104104
'note': self.note
105105
}
106-
return (
107-
'{message}\n\nPath To Error: {path}\n\nAdditional Notes:\n {note}'
108-
.format(**format_dict)
109-
)
106+
message = '{message}\n\nPath To Error: {path}'.format(**format_dict)
107+
if format_dict['note']:
108+
message += '\n\nAdditional Notes:\n {note}'.format(**format_dict)
109+
return message
110110

111111

112112
class PlotlyDictKeyError(PlotlyGraphObjectError):

0 commit comments

Comments
 (0)
0