From 5cafdb7582a2b86ac81979433faa22036ada2764 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 6 Jun 2014 11:35:07 -0400 Subject: [PATCH] More _tivo_ sections without addresses. --- config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index ff1d7ff..fe7d8fe 100644 --- a/config.py +++ b/config.py @@ -96,9 +96,10 @@ def getGUID(): return str(guid) def get_ip(tsn=None): - if tsn: + try: + assert(tsn) dest_ip = tivos[tsn]['address'] - else: + except: dest_ip = '4.2.2.1' s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect((dest_ip, 123)) -- 2.11.4.GIT