Move NO_SI to the standalone server only, which is where I actually need it

This commit is contained in:
Kovid Goyal 2017-05-05 14:47:12 +05:30
parent 9a229891c8
commit 1613f1e2c8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 1 additions and 3 deletions

View File

@ -298,7 +298,7 @@ def main(args=sys.argv):
raise SystemExit(_('You must specify at least one calibre library'))
libraries=[prefs['library_path']]
if not singleinstance('db'):
if b'CALIBRE_NO_SI_DANGER_DANGER' not in os.environ and not singleinstance('db'):
ext = '.exe' if iswindows else ''
raise SystemExit(_(
'Another calibre program such as another instance of {} or the main'

View File

@ -192,8 +192,6 @@ else:
def singleinstance(name):
' Ensure that only a single process holding exists with the specified mutex key '
if b'CALIBRE_NO_SI_DANGER_DANGER' in os.environ:
return True
release_mutex = create_single_instance_mutex(name)
if release_mutex is None:
return False