Skip to content

Commit c70137a

Browse files
committed
Provide stacklevel for an auth warning
1 parent 31be8cb commit c70137a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scrapinghub/legacy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, apikey=None, password='', _old_passwd='',
6363
assert not apikey.startswith('http://'), \
6464
"Instantiating scrapinghub.Connection with url as first argument is not supported"
6565
if password:
66-
warnings.warn("A lot of endpoints support authentication only via apikey.")
66+
warnings.warn("A lot of endpoints support authentication only via apikey.", stacklevel=2)
6767
self.apikey = apikey
6868
self.password = password or ''
6969
self.url = url or self.DEFAULT_ENDPOINT

0 commit comments

Comments
 (0)