Skip to content

Commit

Permalink
Merge pull request #38 from ahharu/to_merge
Browse files Browse the repository at this point in the history
[Urgent] Fixed Branch perms and Client Delete
  • Loading branch information
cosmin committed Apr 22, 2015
2 parents 13aabef + 5c4a424 commit ea4d21a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stashy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ def delete(self, resource, data=None,**kw):
kw = add_json_headers(kw)
return self._session.request(method='DELETE', url=self.url(
resource), data=data, **kw)
return self._session.delete(self.url(resource),data, **kw)
return self._session.delete(self.url(resource), **kw)
6 changes: 5 additions & 1 deletion stashy/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def __init__(self, url, client, parent, api_path=None,
if api_path is None:
api_path = self._client.core_api_path
branches_api_path = self._client.branches_api_path
if branches_api_path is None:
branches_api_path = self._client.branches_api_path

# make sure we're only prefixing with one api path
if url.startswith(api_path):
Expand All @@ -36,7 +38,9 @@ def __init__(self, url, client, parent, api_path=None,
self._url = '{0}/{1}'.format(api_path, url)
self._branchesurl = '{0}/{1}'.format(branches_api_path, url)





def url(self, resource_url="", is_branches=False):
if resource_url and not resource_url.startswith("/"):
resource_url = "/" + resource_url
Expand Down

0 comments on commit ea4d21a

Please sign in to comment.