Skip to content

Commit 1e39f06

Browse files
committed
Refer to the PersistenceDecryptionError wiki page
Update msal_extensions/windows.py Co-authored-by: Jiashuo Li <4003950+jiasli@users.noreply.github.com> Ignore consider-using-f-string, once and for all
1 parent c98bcba commit 1e39f06

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
good-names=
33
logger
44
disable=
5+
consider-using-f-string, # For Python < 3.6
56
super-with-arguments, # For Python 2.x
67
raise-missing-from, # For Python 2.x
78
trailing-newlines,

msal_extensions/persistence.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def save(self, content):
194194
except OSError as exception:
195195
raise PersistenceEncryptionError(
196196
err_no=getattr(exception, "winerror", None), # Exists in Python 3 on Windows
197-
message="Encryption failed: {}. Consider disable encryption.".format(exception), # pylint: disable=consider-using-f-string
197+
message="Encryption failed: {}. Consider disable encryption.".format(exception),
198198
)
199199
with os.fdopen(_open(self._location), 'wb+') as handle:
200200
handle.write(data)
@@ -221,7 +221,10 @@ def load(self):
221221
except OSError as exception:
222222
raise PersistenceDecryptionError(
223223
err_no=getattr(exception, "winerror", None), # Exists in Python 3 on Windows
224-
message="Decryption failed: {}. You may have to delete the file.".format(exception), # pylint: disable=consider-using-f-string
224+
message="Decryption failed: {}. "
225+
"App developer may consider this guidance: "
226+
"https://github.com/AzureAD/microsoft-authentication-extensions-for-python/wiki/PersistenceDecryptionError" # pylint: disable=line-too-long
227+
.format(exception),
225228
location=self._location,
226229
)
227230

msal_extensions/windows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def raw(self):
4040
return blob_buffer.raw
4141

4242
_err_description = {
43-
# Keys came from real world observation, values came from winerror.h (https://errors)
43+
# Keys came from real world observation, values came from winerror.h (http://errors (Microsoft internal))
4444
-2146893813: "Key not valid for use in specified state.",
4545
-2146892987: "The requested operation cannot be completed. "
4646
"The computer must be trusted for delegation and "

0 commit comments

Comments
 (0)