diff --git a/prebuilt.py b/prebuilt.py index d3d41fd5da..8a14ad2f1f 100755 --- a/prebuilt.py +++ b/prebuilt.py @@ -120,10 +120,11 @@ def GetVersion(): def LoadPrivateFilters(build_path): - """Load a file with keywords on a per line basis. + """Load private filters based on ebuilds found under _PRIVATE_OVERLAY_DIR. + This function adds filters to the global set _FILTER_PACKAGES. Args: - filter_file: file to load into _FILTER_PACKAGES + build_path: Path that _PRIVATE_OVERLAY_DIR is in. """ # TODO(scottz): eventually use manifest.xml to find the proper # private overlay path. diff --git a/prebuilt_unittest.py b/prebuilt_unittest.py index 73bca566f5..d6bf886844 100755 --- a/prebuilt_unittest.py +++ b/prebuilt_unittest.py @@ -122,12 +122,8 @@ class TestPrebuiltFilters(unittest.TestCase): def testEmptyFiltersErrors(self): """Ensure LoadPrivateFilters errors if an empty list is generated.""" os.makedirs(os.path.join(self.tmp_dir, prebuilt._PRIVATE_OVERLAY_DIR)) - try: - prebuilt.LoadPrivateFilters(self.tmp_dir) - except prebuilt.FiltersEmpty: - return - - self.fail('Exception was not raised for empty list') + self.assertRaises(prebuilt.FiltersEmpty, prebuilt.LoadPrivateFilters, + self.tmp_dir) class TestPrebuilt(unittest.TestCase):