forked from docker/docker-hoster
Only attempt lines trim if the list isn't empty
This commit is contained in:
parent
05231ffae0
commit
74fa987b9e
|
|
@ -106,6 +106,7 @@ def update_hosts_file():
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#remove all the trailing newlines on the line list
|
#remove all the trailing newlines on the line list
|
||||||
|
if lines:
|
||||||
while lines[-1].strip()=="": lines.pop()
|
while lines[-1].strip()=="": lines.pop()
|
||||||
|
|
||||||
#append all the domain lines
|
#append all the domain lines
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue