diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2012-03-10 16:14:09 -0800 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2012-03-10 16:14:09 -0800 |
commit | 5c33fbc34acca869ec9fe80c4f470edfe560d9a0 (patch) | |
tree | fd9006057a3bfc69496cdcb937162ea7427507e6 /layman/api.py | |
parent | 216ffc02a31cc4ee5c01c836def8d497ee5c5764 (diff) | |
download | layman-5c33fbc34acca869ec9fe80c4f470edfe560d9a0.tar.gz layman-5c33fbc34acca869ec9fe80c4f470edfe560d9a0.tar.bz2 layman-5c33fbc34acca869ec9fe80c4f470edfe560d9a0.zip |
Add news reporting capability to meet GLEP 42 requirement.
Diffstat (limited to 'layman/api.py')
-rwxr-xr-x | layman/api.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/layman/api.py b/layman/api.py index 4ff62dd..3f33a42 100755 --- a/layman/api.py +++ b/layman/api.py @@ -562,9 +562,17 @@ class LaymanAPI(object): settings, trees, mtimedb = load_emerge_config() display_news_notification( trees[settings["ROOT"]]["root_config"], {}) + elif self.config['news_reporter'] == 'custom': + if self.config['custom_news_func'] is None: + _temp = __import__( + 'custom_news_pkg', globals(), locals(), + ['layman_news_func'], -1) + self.config['custom_news_func'] = _temp.custom_news_func self.config['custom_news_func'](repos) + elif self.config['news_reporter'] == 'pkgcore': + # pkgcore is not yet capable return except Exception as err: msg = "update_news() failed running %s news reporter function\n" +\ |