summaryrefslogtreecommitdiffstats
path: root/git_config.py
diff options
context:
space:
mode:
authorSarah Owens <sarato@inkylabs.com>2012-11-01 13:36:50 -0700
committerSarah Owens <sarato@inkylabs.com>2012-11-01 13:36:50 -0700
commita6053d54f1178dc527b383844972c6077ee91a4e (patch)
tree24038d692a1db41c400c9d40da9ac6b5ccfaaa7a /git_config.py
parente072a92a9bb9fdf61bbd1df4e8864f8fd52d5a82 (diff)
downloadgit-repo-a6053d54f1178dc527b383844972c6077ee91a4e.tar.gz
Change usages of xrange() to range()
In Python3, range() creates a generator rather than a list. None of the parameters in the ranges changed looked large enough to create an impact in memory in Python2. Note: the only use of range() was for iteration and did not need to be changed. This is part of a series of changes to introduce Python3 support. Change-Id: I50b665f9296ea160a5076c71f36a65f76e47029f
Diffstat (limited to 'git_config.py')
-rw-r--r--git_config.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git_config.py b/git_config.py
index 6589b193..645c97ab 100644
--- a/git_config.py
+++ b/git_config.py
@@ -168,7 +168,7 @@ class GitConfig(object):
168 elif old != value: 168 elif old != value:
169 self._cache[key] = list(value) 169 self._cache[key] = list(value)
170 self._do('--replace-all', name, value[0]) 170 self._do('--replace-all', name, value[0])
171 for i in xrange(1, len(value)): 171 for i in range(1, len(value)):
172 self._do('--add', name, value[i]) 172 self._do('--add', name, value[i])
173 173
174 elif len(old) != 1 or old[0] != value: 174 elif len(old) != 1 or old[0] != value: