$ python -m git_repo.extract_config
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/jayvdb/projects/git/git-repo/git_repo/extract_config.py", line 33, in <module>
gconf_new=os.path.expanduser(len(sys.argv) >= 2 and sys.argv[1] or '~/.gitconfig-repos')
File "/home/jayvdb/projects/git/git-repo/git_repo/extract_config.py", line 19, in extract_gitrepo_conf
cnew.update({s: {k:v for k,v in cold.items(s)} for s in sections})
AttributeError: 'write' object has no attribute 'update'
Turns out, I was implicitly using python2 when running python -m git_repo.extract_config , and the git.config is quite different on Python 2. My GitPython on python2 is 2.1.7, whereas on python3 it is 2.1.3. I've also tested GitPython master on python3, and it also works.
So I believe it is just an oddity with Python 2. Anyway, git-repo isnt supposed to work on python2, but the command given in the README.md bypasses the sanity check in setup.py
Turns out, I was implicitly using
python2
when runningpython -m git_repo.extract_config
, and thegit.config
is quite different on Python 2. My GitPython on python2 is 2.1.7, whereas on python3 it is 2.1.3. I've also tested GitPython master on python3, and it also works. So I believe it is just an oddity with Python 2. Anyway, git-repo isnt supposed to work on python2, but the command given in theREADME.md
bypasses the sanity check in setup.py