From 5bf5cf8ddd83f632aa85ddbdc6c2dec075854e75 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 11 Mar 2014 17:39:20 +0100 Subject: test: Replace obsolete has_key() with "in" In order to also work with Python 3 --- test/test-network-registration | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test-network-registration') diff --git a/test/test-network-registration b/test/test-network-registration index 5d3f75e3..9410ae6e 100755 --- a/test/test-network-registration +++ b/test/test-network-registration @@ -47,11 +47,11 @@ if __name__ == "__main__": print("Status is: '%s', Operator Name is: '%s'" %\ (props['Status'], props['Name'])) - if props.has_key('LocationAreaCode') and props.has_key('CellId'): + if 'LocationAreaCode' in props and 'CellId' in props: print("Location: '%d', Cell: '%d'" %\ (props['LocationAreaCode'], props['CellId'])) - if props.has_key('Technology'): + if 'Technology' in props: print("Technology: '%s'" % (props['Technology'])) try: -- cgit v1.2.3