Browse Source

Make check for running SABnzbd instance more robust.

Cancel bad side-effect of removing the version check.
Under some circumstances SABnzbd can draw the unjustified conclusion
that another instance is running. Now check for a proper version pattern
in the received output.
tags/0.7.6Beta2
ShyPike 13 years ago
parent
commit
f5b6203194
  1. 3
      SABnzbd.py

3
SABnzbd.py

@ -28,6 +28,7 @@ import signal
import socket
import platform
import time
import re
try:
import Cheetah
@ -691,7 +692,7 @@ def is_sabnzbd_running(url):
try:
url = '%s&mode=version' % (url)
ver = sabnzbd.newsunpack.get_from_url(url)
return True
return bool(ver and re.search(r'\d+\.\d+\.', ver))
except:
return False

Loading…
Cancel
Save