git-multimail: migration: Config is not iterable
Hi there,
Using the latest version of git-multimail there is an issue with migration:
$ ~azat/git-multimail/git-multimail/migrate-mailhook-config --overwrite
Traceback (most recent call last):
File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 271, in <module>
main(sys.argv[1:])
File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 268, in main
migrate_config(strict=options.strict, retain=options.retain, overwrite=options.overwrite)
File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 159, in migrate_config
if not _check_old_config_exists(old):
File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 66, in _check_old_config_exists
if name in old:
TypeError: argument of type 'Config' is not iterableTested on 2.6 and 2.7 python versions.
If you revert 09d0d5b92203f019763e43cef1e57f76f117d2b4 ("Get Python files to pass pep8's tests.") there issue goes away. I understand that this is not the right solution and I'm not the guru of python, so just let you know.
Thanks
Quoted 7 lines · Azat Khuzhin
Hi there,
Using the latest version of git-multimail there is an issue with migration:
$ ~azat/git-multimail/git-multimail/migrate-mailhook-config --overwrite Traceback (most recent call last):
...
Quoted 3 lines
File "
/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 66, in_check_old_config_exists
if name in old:
TypeError: argument of type 'Config' is not iterable
Thanks for the report. I'm not the strongest on python data model and its special methods but I believe I've got a fix:
https://github.com/mhagger/git-multimail/pull/58
Quoted 15 lines · Azat Khuzhin
Using the latest version of git-multimail there is an issue with migration:
$ ~azat/git-multimail/git-multimail/migrate-mailhook-config --overwrite Traceback (most recent call last): File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 271, in <module> main(sys.argv[1:]) File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 268, in main migrate_config(strict=options.strict, retain=options.retain, overwrite=options.overwrite) File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 159, in migrate_config if not _check_old_config_exists(old): File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 66, in _check_old_config_exists if name in old: TypeError: argument of type 'Config' is not iterable
Quoted 5 lines
Tested on 2.6 and 2.7 python versions.
If you revert
09d0d5b92203f019763e43cef1e57f76f117d2b4("Get Python files to pass pep8's tests.") there issue goes away. I understand that this is not the right solution and I'm not the guru of python, so just let you know.
Thanks for the bug report and for narrowing it down to the broken commit. I just pushed a fix to GitHub. Let me know if it works for you now.
Elijah: your fix is also correct, but I didn't see it before I pushed my own solution. Sorry about that.
Junio: you don't have to worry about any of this, because the commit that caused the breakage is not in your tree yet.
Michael
Signature · 2 lines
Michael Haggerty [email protected]
Quoted 18 lines · Michael Haggerty
Quoted 17 lines · Azat Khuzhin
Using the latest version of git-multimail there is an issue with migration:
$ ~azat/git-multimail/git-multimail/migrate-mailhook-config --overwrite Traceback (most recent call last): File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 271, in <module> main(sys.argv[1:]) File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 268, in main migrate_config(strict=options.strict, retain=options.retain, overwrite=options.overwrite) File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 159, in migrate_config if not _check_old_config_exists(old): File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 66, in _check_old_config_exists if name in old: TypeError: argument of type 'Config' is not iterableTested on 2.6 and 2.7 python versions.
Quoted 7 lines
Quoted 3 lines
If you revert
09d0d5b92203f019763e43cef1e57f76f117d2b4("Get Python files to pass pep8's tests.") there issue goes away. I understand that this is not the right solution and I'm not the guru of python, so just let you know.Thanks for the bug report and for narrowing it down to the broken commit. I just pushed a fix to GitHub. Let me know if it works for you now.
Yeah, it works, thanks!
Signature · 2 lines
Respectfully Azat Khuzhin