Updated code quality removed print statement spaces in singleinstance.py #1833

Merged
kdcis merged 4 commits from v0.6-codequality-singleinstance into v0.6 2021-10-01 14:03:06 +02:00
Showing only changes of commit 7d945a5c68 - Show all commits

View File

@ -55,7 +55,9 @@ class singleinstance(object):
)
except OSError as e:
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
else:
pidLine = "%i\n" % self.lockPid
@ -70,7 +72,9 @@ class singleinstance(object):
fcntl.lockf(self.fp, fcntl.LOCK_EX | fcntl.LOCK_NB)
self.lockPid = os.getpid()
except IOError:
g1itch commented 2021-08-31 16:41:43 +02:00 (Migrated from github.com)
Review

sys.exit('Another instance of this application is already running')

`sys.exit('Another instance of this application is already running')`
g1itch commented 2021-08-31 16:46:34 +02:00 (Migrated from github.com)
Review

And the same above. print(e.errno) is also redundant as for me.

And the same above. `print(e.errno)` is also redundant as for me.
kdcis commented 2021-09-02 13:46:11 +02:00 (Migrated from github.com)
Review

Updated

Updated
sys.exit('Another instance of this application is already running')
sys.exit(
'Another instance of this application is'
' already running')
else:
pidLine = "%i\n" % self.lockPid
self.fp.truncate(0)