#! /bin/sh /usr/share/dpatch/dpatch-run ## 05_bttrack_connerr_fix.dpatch by Micah Anderson ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Connections to bttrack fail (log shows AttributeError stack trace) ## DP: http://forums.degreez.net/viewtopic.php?t=3848 ## DP: Bug#294803 @DPATCH@ --- bittornado.orig/BitTornado/BT1/track.py +++ bittornado/BitTornado/BT1/track.py @@ -190,7 +190,7 @@ def get_forwarded_ip(headers): x = _get_forwarded_ip(headers) - if not is_valid_ip(x) or local_IPs.includes(x): + if x is None or not is_valid_ip(x) or local_IPs.includes(x): return None return x