The code from bug 649276 provides an inherited _key_refresh_retry_decorator method that we can use here.
Patches posted for review: https://github.com/gentoo/portage/pull/335 https://archives.gentoo.org/gentoo-portage-dev/message/7b4aaf08d7446de4d75af66813ef3dbf
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=89b85e47d7ac0d5f36b182c36eb1e72db7187b36 commit 89b85e47d7ac0d5f36b182c36eb1e72db7187b36 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-07-08 20:29:40 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-07-10 04:25:54 +0000 GitSync: add key refresh retry (bug 660732) Bug: https://bugs.gentoo.org/660732 pym/portage/sync/modules/git/git.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) https://gitweb.gentoo.org/proj/portage.git/commit/?id=06f304c8718ac653bbdf9b5b999c03cba898bf3e commit 06f304c8718ac653bbdf9b5b999c03cba898bf3e Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-07-08 20:09:45 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-07-10 04:23:12 +0000 SyncBase: split out _refresh_keys method (bug 660732) Split out a _refresh_keys method from the RsyncSync class, so GitSync can use it for retry support. Bug: https://bugs.gentoo.org/660732 pym/portage/sync/modules/rsync/rsync.py | 33 +------------------------- pym/portage/sync/syncbase.py | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 32 deletions(-)