zephyr_mirror: Fix incorrect check for already running mirror bots.

(imported from commit 76e758697ac19362e79d4a4995b576f10d229514)
This commit is contained in:
Tim Abbott 2013-05-16 14:44:35 -04:00 committed by Leo Franchi
parent 4bf0ecc159
commit c849ae3470

View file

@ -925,7 +925,7 @@ or specify the --api-key-file option.""" % (options.api_key_file,))))
# Kill all zephyr_mirror processes other than this one and its parent. # Kill all zephyr_mirror processes other than this one and its parent.
if not options.test_mode: if not options.test_mode:
pgrep_query = "/usr/bin/python.*zephyr_mirror" pgrep_query = "python.*zephyr_mirror"
if options.shard is not None: if options.shard is not None:
pgrep_query = "%s.*--shard=%s" % (pgrep_query, options.shard) pgrep_query = "%s.*--shard=%s" % (pgrep_query, options.shard)
proc = subprocess.Popen(['pgrep', '-U', os.environ["USER"], "-f", pgrep_query], proc = subprocess.Popen(['pgrep', '-U', os.environ["USER"], "-f", pgrep_query],