Skip to content

Commit 2e2aa8d

Browse files
yangskyboxlabsgitster
authored andcommitted
git-p4: use dict.items() iteration for python3 compatibility
Python3 uses dict.items() instead of .iteritems() to provide iteratoration over dict. Although items() is technically less efficient for python2.7 (allocates a new list instead of simply iterating), the amount of data involved is very small and the penalty negligible. Signed-off-by: Yang Zhao <[email protected]> Reviewed-by: Ben Keene <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a6b1306 commit 2e2aa8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-p4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,7 @@ def prepareSubmitTemplate(self, changelist=None):
17451745
break
17461746
if not change_entry:
17471747
die('Failed to decode output of p4 change -o')
1748-
for key, value in change_entry.iteritems():
1748+
for key, value in change_entry.items():
17491749
if key.startswith('File'):
17501750
if 'depot-paths' in settings:
17511751
if not [p for p in settings['depot-paths']

0 commit comments

Comments
 (0)