Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-925

Error in GCE driver in function _get_error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      _get_error function assumes that the body['error'] value is a dict, but in some cases it contains an string (unicode).
      So it tries to do a err.get and it failts.
      I has to be something like that:

              if 'code' in err:
                  code = err.get('code')
                  message = err.get('message')
              else:
                  code = None
                  if 'reason' in err:
                      code = err.get('reason')
                  message = body.get('error_description', err)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                micafer Miguel Caballer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: