From 037840c161ac2f1f0b476e1a9a8ddd75f062a555 Mon Sep 17 00:00:00 2001 From: Niko Ugarov Date: Thu, 2 Jun 2022 21:21:35 +0200 Subject: [PATCH] constent line endings in saved configs less headache when it's under source control --- aws_google_auth/configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws_google_auth/configuration.py b/aws_google_auth/configuration.py index 41c9c46..572eae2 100644 --- a/aws_google_auth/configuration.py +++ b/aws_google_auth/configuration.py @@ -174,7 +174,7 @@ def write(self, amazon_object): config_parser.set(profile, 'google_config.google_username', self.username) config_parser.set(profile, 'google_config.bg_response', self.bg_response) - with open(self.config_file, 'w+') as f: + with open(self.config_file, 'w+', newline='\n') as f: config_parser.write(f) finally: config_file_lock.release() @@ -194,7 +194,7 @@ def write(self, amazon_object): credentials_parser.set(self.profile, 'aws_session_expiration', amazon_object.expiration.strftime('%Y-%m-%dT%H:%M:%S%z')) credentials_parser.set(self.profile, 'aws_session_token', amazon_object.session_token) - with open(self.credentials_file, 'w+') as f: + with open(self.credentials_file, 'w+', newline='\n') as f: credentials_parser.write(f) finally: credentials_file_lock.release()