From 1613f1e2c80686e54ead6650c98603745d83a216 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 5 May 2017 14:47:12 +0530 Subject: [PATCH] Move NO_SI to the standalone server only, which is where I actually need it --- src/calibre/srv/standalone.py | 2 +- src/calibre/utils/lock.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/calibre/srv/standalone.py b/src/calibre/srv/standalone.py index cd71015f88..04938036c8 100644 --- a/src/calibre/srv/standalone.py +++ b/src/calibre/srv/standalone.py @@ -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' diff --git a/src/calibre/utils/lock.py b/src/calibre/utils/lock.py index c0678b1a47..bc86b3c4a6 100644 --- a/src/calibre/utils/lock.py +++ b/src/calibre/utils/lock.py @@ -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