diff --git a/hoster.py b/hoster.py index 9f634bc..d87448a 100644 --- a/hoster.py +++ b/hoster.py @@ -106,7 +106,8 @@ def update_hosts_file(): break; #remove all the trailing newlines on the line list - while lines[-1].strip()=="": lines.pop() + if lines: + while lines[-1].strip()=="": lines.pop() #append all the domain lines if len(hosts)>0: