aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2015-10-30 16:11:11 +0100
committerSebastian Pipping <sebastian@pipping.org>2015-10-30 16:11:11 +0100
commit3b82d27c1f7f52fbd2970886c7f1c26c92678d35 (patch)
tree629874f030050e9a2123410f8ef915ee8d9153a8
parentFixed bug #384535, modified test_cli and upped the version (diff)
downloadmetagen-3b82d27c1f7f52fbd2970886c7f1c26c92678d35.tar.gz
metagen-3b82d27c1f7f52fbd2970886c7f1c26c92678d35.tar.bz2
metagen-3b82d27c1f7f52fbd2970886c7f1c26c92678d35.zip
Fix herdbase import for portage >=2.2.22 (bug #561908)
-rwxr-xr-xmetagen/main.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/metagen/main.py b/metagen/main.py
index a8e8515..d9aded4 100755
--- a/metagen/main.py
+++ b/metagen/main.py
@@ -18,9 +18,16 @@ from optparse import OptionParser
from commands import getstatusoutput
from portage import config
-from repoman import herdbase
from portage.output import red, blue
+try:
+ # portage <2.2.22
+ # https://bugs.gentoo.org/show_bug.cgi?id=561908
+ from repoman import herdbase
+except ImportError:
+ # portage >=2.2.22
+ from repoman.checks.herds import herdbase
+
from metagen.version import __version__
from metagen import metagenerator