Commit 69eef72 1 parent 63be405 commit 69eef72 Copy full SHA for 69eef72
File tree 3 files changed +7
-9
lines changed
3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 5
5
import time
6
6
import logging
7
7
from distutils .version import LooseVersion
8
- import warnings
9
8
10
9
import portalocker
11
10
@@ -58,7 +57,7 @@ def __enter__(self):
58
57
if not self ._try_to_create_lock_file ():
59
58
logger .warning ("Process %d failed to create lock file" , pid )
60
59
file_handle = self ._lock .__enter__ ()
61
- file_handle .write ('{} {}' .format (pid , sys .argv [0 ]).encode ('utf-8' ))
60
+ file_handle .write ('{} {}' .format (pid , sys .argv [0 ]).encode ('utf-8' )) # pylint: disable=consider-using-f-string
62
61
return file_handle
63
62
64
63
def __exit__ (self , * args ):
@@ -69,5 +68,5 @@ def __exit__(self, *args):
69
68
# file for itself.
70
69
os .remove (self ._lockpath )
71
70
except OSError as ex : # pylint: disable=invalid-name
72
- if ex .errno != errno .ENOENT and ex . errno != errno .EACCES :
71
+ if ex .errno not in ( errno .ENOENT , errno .EACCES ) :
73
72
raise
Original file line number Diff line number Diff line change @@ -21,10 +21,9 @@ def __init__(self, exit_status):
21
21
self .exit_status = exit_status
22
22
# TODO: pylint: disable=fixme
23
23
# use SecCopyErrorMessageString to fetch the appropriate message here.
24
- self .message = \
25
- '{} ' \
26
- 'see https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacErrors.h' \
27
- .format (self .exit_status )
24
+ self .message = (
25
+ '{} see https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacErrors.h' # pylint: disable=consider-using-f-string,line-too-long
26
+ .format (self .exit_status ))
28
27
29
28
def _get_native_location (name ):
30
29
# type: (str) -> str
@@ -33,7 +32,7 @@ def _get_native_location(name):
33
32
:param name: The name of the library to be loaded.
34
33
:return: The location of the library on a MacOS filesystem.
35
34
"""
36
- return '/System/Library/Frameworks/{0}.framework/{0}' .format (name )
35
+ return '/System/Library/Frameworks/{0}.framework/{0}' .format (name ) # pylint: disable=consider-using-f-string
37
36
38
37
39
38
# Load native MacOS libraries
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ def load(self):
227
227
# This happens when a load() is called before a save().
228
228
# We map it into cross-platform error for unified catching.
229
229
raise PersistenceNotFound (
230
- location = "Service:{} Account:{}" .format (
230
+ location = "Service:{} Account:{}" .format ( # pylint: disable=consider-using-f-string
231
231
self ._service_name , self ._account_name ),
232
232
message = (
233
233
"Keychain persistence not initialized. "
You can’t perform that action at this time.
0 commit comments