8000 Fix sketch of requires_app_credentials · mikewaters/github3.py@ee50f41 · GitHub
[go: up one dir, main page]

Skip to content

Commit ee50f41

Browse files
committed
Fix sketch of requires_app_credentials
1 parent 81b903f commit ee50f41

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

github3/decorators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def requires_app_credentials(func):
7676
"""
7777
@wraps(func)
7878
def auth_wrapper(self, *args, **kwargs):
79-
if hasattr(self, '_session') and self._session.params:
79+
client_id, client_secret = self._session.retrieve_client_credentials()
80+
if client_id and client_secret:
8081
return func(self, *args, **kwargs)
8182
else:
8283
from github3.models import GitHubError

0 commit comments

Comments
 (0)
0