From 87358b5fca645bb541e7554c49fc60cf839d53c0 2014-01-02 17:25:36 From: James Porter Date: 2014-01-02 17:25:36 Subject: [PATCH] Use `startswith` instead of `in` --- diff --git a/IPython/utils/localinterfaces.py b/IPython/utils/localinterfaces.py index 05a9645..2e9f842 100644 --- a/IPython/utils/localinterfaces.py +++ b/IPython/utils/localinterfaces.py @@ -101,7 +101,7 @@ def _load_ips_ifconfig(): for line in lines: blocks = line.lower().split() if (len(blocks) >= 2) and (blocks[0] == 'inet'): - if "addr:" in blocks[1]: + if blocks[1].startswith("addr:"): addrs.append(blocks[1].split(":")[1]) else: addrs.append(blocks[1])