diff options
author | Nicolas Porcel <nicolasporcel06@gmail.com> | 2017-09-18 01:29:27 +0200 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2017-09-17 16:59:11 -0700 |
commit | 0d1d2b8dccdd5ce9f99358fe842fb968a0423a25 (patch) | |
tree | bb6835053d6432736055a489196d385fcb2e54a7 | |
parent | AsynchronousLock: allow missing dummy_threading for Python 3.7 (diff) | |
download | portage-0d1d2b8dccdd5ce9f99358fe842fb968a0423a25.tar.gz portage-0d1d2b8dccdd5ce9f99358fe842fb968a0423a25.tar.bz2 portage-0d1d2b8dccdd5ce9f99358fe842fb968a0423a25.zip |
Fix emerge --info when using webrsync (bug 630538)
When calling retrieve_head from a SyncBase object, it is expected to
raise a NotImplementedError. However, all classes that do not inherit
from NewBase will raise an AttributeError which is not caught.
Fixes: 0e1699ad6b3f ("emerge: Add head commit per repo to --info")
-rw-r--r-- | pym/portage/sync/syncbase.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/sync/syncbase.py b/pym/portage/sync/syncbase.py index 05e4d69d4..43b667fb0 100644 --- a/pym/portage/sync/syncbase.py +++ b/pym/portage/sync/syncbase.py @@ -102,6 +102,10 @@ class SyncBase(object): paths.extend(_SUBMODULE_PATH_MAP[name]) return tuple(paths) + def retrieve_head(self, **kwargs): + '''Get information about the head commit''' + raise NotImplementedError + class NewBase(SyncBase): '''Subclasses Syncbase adding a new() and runs it @@ -133,7 +137,3 @@ class NewBase(SyncBase): '''Update existing repository ''' raise NotImplementedError - - def retrieve_head(self, **kwargs): - '''Get information about the head commit''' - raise NotImplementedError |