We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e671fe commit 0c505b2Copy full SHA for 0c505b2
rest_framework_sso/keys.py
@@ -14,7 +14,8 @@ def read_key_file(file_name):
14
file_path = os.path.abspath(os.path.join(api_settings.KEY_STORE_ROOT, file_name))
15
else:
16
file_path = os.path.abspath(file_name)
17
- return open(file_path, 'rb').read()
+ with open(file_path, 'rb') as file_obj:
18
+ return file_obj.read()
19
20
21
def get_key_id(file_name):
0 commit comments