Fixed PEP8 warnings

This commit is contained in:
kuldeep.k@cisinlabs.com 2021-09-06 21:21:28 +05:30
parent 1f122fba23
commit 7d945a5c68
No known key found for this signature in database
GPG Key ID: AF4FB299BF7C7C2A

View File

@ -55,7 +55,9 @@ class singleinstance(object):
) )
except OSError as e: except OSError as e:
if e.errno == 13: if e.errno == 13:
sys.exit('Another instance of this application is already running') sys.exit(
'Another instance of this application is'
' already running')
raise raise
else: else:
pidLine = "%i\n" % self.lockPid pidLine = "%i\n" % self.lockPid
@ -70,7 +72,9 @@ class singleinstance(object):
fcntl.lockf(self.fp, fcntl.LOCK_EX | fcntl.LOCK_NB) fcntl.lockf(self.fp, fcntl.LOCK_EX | fcntl.LOCK_NB)
self.lockPid = os.getpid() self.lockPid = os.getpid()
except IOError: except IOError:
sys.exit('Another instance of this application is already running') sys.exit(
'Another instance of this application is'
' already running')
else: else:
pidLine = "%i\n" % self.lockPid pidLine = "%i\n" % self.lockPid
self.fp.truncate(0) self.fp.truncate(0)