dc0eb66a399d49e13b7e6beda0f726737eedb520,perfkitbenchmarker/providers/digitalocean/digitalocean_virtual_machine.py,DigitalOceanVirtualMachine,_Delete,#DigitalOceanVirtualMachine#,162

Before Change



  def _Delete(self):
    Delete a DigitalOcean VM instance.
    stdout, ret = util.RunCurlCommand(
        "DELETE", "droplets/%s" % self.droplet_id)
    if ret != 0:
      if ret == 404:
        return  // Assume already deleted.
      raise errors.Resource.RetryableDeletionError("Deletion failed: %s" %

After Change


  def _Delete(self):
    Delete a DigitalOcean VM instance.

    response, retcode = util.DoctlAndParse(
        ["compute", "droplet", "delete", self.droplet_id])
    // The command doesn"t return the HTTP status code, and the error
    // format is very difficult to parse, so we string search.
    if retcode and "404" in response["errors"][0]["detail"]:
      return
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: dc0eb66a399d49e13b7e6beda0f726737eedb520
Time: 2016-09-06
Author: nlavine@google.com
File Name: perfkitbenchmarker/providers/digitalocean/digitalocean_virtual_machine.py
Class Name: DigitalOceanVirtualMachine
Method Name: _Delete


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: dc0eb66a399d49e13b7e6beda0f726737eedb520
Time: 2016-09-06
Author: nlavine@google.com
File Name: perfkitbenchmarker/providers/digitalocean/digitalocean_virtual_machine.py
Class Name: DigitalOceanVirtualMachine
Method Name: _PostCreate


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: dc0eb66a399d49e13b7e6beda0f726737eedb520
Time: 2016-09-06
Author: nlavine@google.com
File Name: perfkitbenchmarker/providers/digitalocean/digitalocean_virtual_machine.py
Class Name: DigitalOceanVirtualMachine
Method Name: _Exists