Skip to content

Commit

Permalink
fix: random crashes in credentials.py (#2946)
Browse files Browse the repository at this point in the history
os.path.sep and os.sep are supposed to do the same but os.path.sep can lead to random crashes in newer python versions
  • Loading branch information
markste-in authored Jul 30, 2023
1 parent 22ca528 commit b1238b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion botocore/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def _create_cache_key(self):

def _make_file_safe(self, filename):
# Replace :, path sep, and / to make it the string filename safe.
filename = filename.replace(':', '_').replace(os.path.sep, '_')
filename = filename.replace(':', '_').replace(os.sep, '_')
return filename.replace('/', '_')

def _get_credentials(self):
Expand Down

0 comments on commit b1238b3

Please sign in to comment.