repoman: handle missing @DEPRECATED lic group v2.2.0_alpha143
authorZac Medico <zmedico@gentoo.org>
Thu, 29 Nov 2012 21:39:53 +0000 (13:39 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 29 Nov 2012 21:39:53 +0000 (13:39 -0800)
bin/repoman

index a38ffe121b21a19d2c3de1d9150683592132e8ae..161d87c01b8a15363f3e5ad757e6d6ccd2b696f2 100755 (executable)
@@ -925,12 +925,10 @@ for x in repoman_settings.archlist():
                print(red("up with the "+x+" team."))
                print()
 
-global_noiselimit = portage.util.noiselimit
-# Suppress error message if @DEPRECATED license group doesn't exist
-portage.util.noiselimit = -2
-liclist_deprecated = \
-       set(repoman_settings._license_manager.expandLicenseTokens(["@DEPRECATED"]))
-portage.util.noiselimit = global_noiselimit
+liclist_deprecated = set()
+if "DEPRECATED" in repoman_settings._license_manager._license_groups:
+       liclist_deprecated.update(
+               repoman_settings._license_manager.expandLicenseTokens(["@DEPRECATED"]))
 
 if not liclist:
        logging.fatal("Couldn't find licenses?")