From 66c9200f0ce747187abc77fd256570d9942c9f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 5 Aug 2016 16:09:33 +0200 Subject: [PATCH] Removed long-unused code --- pillarsdk/api.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pillarsdk/api.py b/pillarsdk/api.py index d689d7b..81d24bb 100644 --- a/pillarsdk/api.py +++ b/pillarsdk/api.py @@ -73,26 +73,6 @@ class Api(object): """Generate new token by making a POST request """ return self.token - """ - path = "/tokens" - payload = {'username': self.username} - - if self.token: - return self.token - else: - # If token is not set we do initial request with username and password - self.token = self.http_call( - utils.join_url(self.endpoint, path), "POST", - data=payload, - headers={ - "Authorization": ("Basic {0}".format(self.basic_auth())), - "Content-Type": "application/x-www-form-urlencoded", - "Accept": "application/json", - "User-Agent": self.user_agent - }) - - return self.token - """ def request(self, url, method, body=None, headers=None, files=None): """Make HTTP call, formats response and does error handling.