We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17f52df commit 02a2a8bCopy full SHA for 02a2a8b
1 file changed
watson_developer_cloud/watson_service.py
@@ -148,7 +148,7 @@ def _convert_boolean_values(dictionary):
148
return dictionary
149
150
def _has_bad_first_or_last_char(str):
151
- return str.startswith('{') or str.startswith('"') or str.endswith('}') or str.endswith('"')
+ return str is not None and (str.startswith('{') or str.startswith('"') or str.endswith('}') or str.endswith('"'))
152
153
def get_error_message(response):
154
"""
0 commit comments