[Python-apps-commits] r13140 - in packages/sabnzbdplus/trunk/debian/patches (1 file)
jcfp-guest at users.alioth.debian.org
jcfp-guest at users.alioth.debian.org
Wed Apr 27 21:43:29 UTC 2016
Date: Wednesday, April 27, 2016 @ 21:43:27
Author: jcfp-guest
Revision: 13140
Patch 09: also kill tests run via interface dashboards
Modified:
packages/sabnzbdplus/trunk/debian/patches/09_remove_external_resources.diff
Modified: packages/sabnzbdplus/trunk/debian/patches/09_remove_external_resources.diff
===================================================================
--- packages/sabnzbdplus/trunk/debian/patches/09_remove_external_resources.diff 2016-04-27 20:15:38 UTC (rev 13139)
+++ packages/sabnzbdplus/trunk/debian/patches/09_remove_external_resources.diff 2016-04-27 21:43:27 UTC (rev 13140)
@@ -35,7 +35,7 @@
def test_ipv6():
""" Check if external IPv6 addresses are reachable """
- if not cfg.selftest_host():
-+ if not cfg.selftest_host() or sabnzbd.cfg.log_level() != 2:
++ if not cfg.selftest_host() or sabnzbd.cfg.log_level() < 2:
# User disabled the test, assume active IPv6
return True
try:
@@ -45,8 +45,7 @@
return ipv4
def publicipv4():
-+ # Disabled by Debian packaging unless debugging
-+ if sabnzbd.cfg.log_level() != 2:
++ if sabnzbd.cfg.log_level() < 2:
+ public_ipv4 = None
+ return public_ipv4
# Because of dual IPv4/IPv6 clients, finding the public ipv4 needs special attention,
@@ -56,10 +55,25 @@
return public_ipv4
def ipv6():
-+ # Disabled by Debian packaging unless debugging
-+ if sabnzbd.cfg.log_level() != 2:
++ if sabnzbd.cfg.log_level() < 2:
+ ipv6 = None
+ return ipv6
try:
s_ipv6 = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
s_ipv6.connect(('2001:db8::8080', 80)) # IPv6 prefix for documentation purpose
+--- a/sabnzbd/interface.py
++++ b/sabnzbd/interface.py
+@@ -2466,8 +2466,11 @@
+ # Dashboard: Begin
+ if not kwargs.get('skip_dashboard'):
+ header['localipv4'] = localipv4()
+- header['publicipv4'] = publicipv4()
+- header['ipv6'] = ipv6()
++ if sabnzbd.cfg.log_level() < 2:
++ header['publicipv4'] = header['ipv6'] = 'disabled at log level < 2 (debug)'
++ else:
++ header['publicipv4'] = publicipv4()
++ header['ipv6'] = ipv6()
+ # Dashboard: DNS-check
+ try:
+ socket.gethostbyname(cfg.selftest_host())
More information about the Python-apps-commits
mailing list