You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by thehunmonkgroup <gi...@git.apache.org> on 2017/12/12 03:46:27 UTC
[GitHub] libcloud pull request #1153: fix path for profitbricks list_snapshots() meth...
GitHub user thehunmonkgroup opened a pull request:
https://github.com/apache/libcloud/pull/1153
fix path for profitbricks list_snapshots() method
## Fix path for profitbricks compute driver ```list_snapshots``` method
### Description
The leading slash breaks the URL in this method. With it, I get:
```
Traceback (most recent call last):
File "./profitbricks.py", line 38, in <module>
snapshots = driver.list_snapshots()
File "/usr/lib/python2.7/dist-packages/libcloud/compute/drivers/profitbricks.py", line 1176, in list_snapshots
method='GET'
File "/usr/lib/python2.7/dist-packages/libcloud/compute/drivers/profitbricks.py", line 143, in request
raw=raw
File "/usr/lib/python2.7/dist-packages/libcloud/common/base.py", line 871, in request
response = responseCls(**kwargs)
File "/usr/lib/python2.7/dist-packages/libcloud/common/base.py", line 180, in __init__
headers=self.headers)
libcloud.common.exceptions.BaseHTTPError
```
Removing the slash makes the method work again, and it's in line with the format of the other API requests in the driver that omit the full URL.
### Status
- done, ready for review
### Checklist (tick everything that applies)
- [ ] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) (required, can be done after the PR checks)
- [ ] Documentation
- [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
- [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/stirlab/libcloud fix-profitbricks-list-snapshots
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/libcloud/pull/1153.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1153
----
commit 7b2dc78d178240e8605f34b6121049edca50bc2b
Author: Chad Phillips <ch...@apartmentlines.com>
Date: 2017-12-12T03:37:56Z
fix path for profitbricks list_snapshots() method
leading slash breaks the URL
----
---
[GitHub] libcloud pull request #1153: fix path for profitbricks list_snapshots() meth...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/libcloud/pull/1153
---