Change in pysim[master]: [pylint] Fix calling non-existing iteritems() of dict

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun May 2 20:22:17 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/24027 )

Change subject: [pylint] Fix calling non-existing iteritems() of dict
......................................................................

[pylint] Fix calling non-existing iteritems() of dict

This method has been removed [1] in Python 3.0:

pySim/cards.py:581:14: E1101: Instance of 'dict' has no 'iteritems' member (no-member)
pySim/cards.py:591:24: E1101: Instance of 'dict' has no 'iteritems' member (no-member)

[1] https://wiki.python.org/moin/Python3.0#Built-In_Changes

Change-Id: Iba7ad9ed2a9b197ecedaaed1c6744fe1c721515a
---
M pySim/cards.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/pySim/cards.py b/pySim/cards.py
index ddc0bf4..3b53654 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -578,7 +578,7 @@
 	def erase(self):
 		# Dummy
 		df = {}
-		for k, v in self._files.iteritems():
+		for k, v in self._files.items():
 			ofs = 1
 			fv = v[1] * 'ff'
 			if k == 'name':
@@ -588,7 +588,7 @@
 
 		# Write
 		for n in range(0,self._get_count()):
-			for k, (msg, ofs) in df.iteritems():
+			for k, (msg, ofs) in df.items():
 				self._scc.update_record(['3f00', '7f4d', k], n + ofs, msg)
 
 

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/24027
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iba7ad9ed2a9b197ecedaaed1c6744fe1c721515a
Gerrit-Change-Number: 24027
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210502/c4f3f689/attachment.htm>


More information about the gerrit-log mailing list