Message ID | 20191207003333.3228-14-yang.zhao@skyboxlabs.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | git-p4: python3 compatibility | expand |
diff --git a/git-p4.py b/git-p4.py index c888e4825a..867a8d42ef 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1763,7 +1763,7 @@ def prepareSubmitTemplate(self, changelist=None): break if not change_entry: die('Failed to decode output of p4 change -o') - for key, value in change_entry.iteritems(): + for key, value in change_entry.items(): if key.startswith('File'): if 'depot-paths' in settings: if not [p for p in settings['depot-paths']
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 <yang.zhao@skyboxlabs.com> --- git-p4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)