8000 install from source link · srijan-deepsource/python-sasctl@21408b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 21408b4

Browse files
committed
install from source link
1 parent e1e8a1b commit 21408b4

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Unreleased
22
----------
3-
-
3+
**Bugfixes**
4+
- SSL warnings no longer repeatedly raised when `verify_ssl=False` but `CAS_CLIENT_SSL_CA_LIST` is specified.
5+
6+
**Improvements**
7+
- All `delete_*()` service methods return `None` instead of empty string.
48

59
v1.5.7 (2021-05-04)
610
-------------------

src/sasctl/_services/service.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,12 @@ def delete_item(cls, item):
320320
item = item['id']
321321

322322
if cls.is_uuid(item):
323-
return cls.delete(path + '/{id}'.format(id=item))
323+
response = cls.delete(path + '/{id}'.format(id=item))
324+
# Response generally seems to be an empty string. If so, just return None
325+
# BUT, if the service provides an actual response, return it.
326+
if response:
327+
return response
328+
return
324329
raise ValueError("Unrecognized id '%s'" % item)
325330

326331
# Pull object name from path if unspecified (many paths end in

src/sasctl/core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,11 @@ def is_ipaddress(hst):
303303

304304
self.mount('https://', adapter)
305305

306-
else:
307-
# Every request will generate an InsecureRequestWarning
308-
from urllib3.exceptions import InsecureRequestWarning
309-
310-
warnings.simplefilter('default', InsecureRequestWarning)
306+
# If we're skipping SSL verification, urllib3 will raise InsecureRequestWarnings on
307+
# every request. Insert a warning filter so these warnings only appear on the first request.
308+
if not verify_ssl:
309+
from urllib3.exceptions import InsecureRequestWarning
310+
warnings.simplefilter('default', InsecureRequestWarning)
311311

312312
self.filters = DEFAULT_FILTERS
313313

0 commit comments

Comments
 (0)
0