Commits

Ben Speakmon  committed 90487e6 Merge

Merged in markeganfuller/jira-python (pull request #6)

Added a length check on error messages.

  • Participants
  • Parent commits a52c6d4, 9261c85

Comments (0)

Files changed (1)

File jira/exceptions.py

                 elif 'errorMessages' in response:
                     # JIRA 5.0.x error messages sometimes come wrapped in this array
                     errorMessages = response['errorMessages']
-                    if isinstance(errorMessages, (list, tuple)):
+                    if isinstance(errorMessages, (list, tuple)) and len(errorMessages) > 0:
                         error = errorMessages[0]
                     else:
                         error = errorMessages