Skip to content

Commit 02a2a8b

Browse files
committed
chore(services): Check if str is None
1 parent 17f52df commit 02a2a8b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

watson_developer_cloud/watson_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _convert_boolean_values(dictionary):
148148
return dictionary
149149

150150
def _has_bad_first_or_last_char(str):
151-
return str.startswith('{') or str.startswith('"') or str.endswith('}') or str.endswith('"')
151+
return str is not None and (str.startswith('{') or str.startswith('"') or str.endswith('}') or str.endswith('"'))
152152

153153
def get_error_message(response):
154154
"""

0 commit comments

Comments
 (0)