aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-21 19:22:03 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-26 15:25:00 +0000
commit393adbc779c4bf332e9bb966a14f73fea002ae41 (patch)
tree23608fb619f830b585700444d036c3cae3ee091b /python
parent04f54edce9cefa3a71fc274376b6a64e6eafee1f (diff)
downloadpaludis-393adbc779c4bf332e9bb966a14f73fea002ae41.tar.gz
paludis-393adbc779c4bf332e9bb966a14f73fea002ae41.tar.xz
Pass optional reason to unmask queries
Diffstat (limited to 'python')
-rw-r--r--python/additional_tests.cc2
-rw-r--r--python/environment.cc6
-rwxr-xr-xpython/environment_TEST.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/python/additional_tests.cc b/python/additional_tests.cc
index cf9c73931..6b8fafe99 100644
--- a/python/additional_tests.cc
+++ b/python/additional_tests.cc
@@ -62,7 +62,7 @@ namespace environment
e.mask_for_user(pid, false);
- bool PALUDIS_ATTRIBUTE((unused)) b4(e.unmasked_by_user(pid));
+ bool PALUDIS_ATTRIBUTE((unused)) b4(e.unmasked_by_user(pid, ""));
e.package_database();
diff --git a/python/environment.cc b/python/environment.cc
index 752c8cb31..1a0d3f80a 100644
--- a/python/environment.cc
+++ b/python/environment.cc
@@ -108,13 +108,13 @@ class EnvironmentImplementationWrapper :
throw PythonMethodNotImplemented("EnvironmentImplementation", "mask_for_user");
}
- virtual bool unmasked_by_user(const std::shared_ptr<const PackageID> & p) const
+ virtual bool unmasked_by_user(const std::shared_ptr<const PackageID> & p, const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
if (bp::override f = get_override("unmasked_by_user"))
- return f(p);
+ return f(p, s);
else
throw PythonMethodNotImplemented("EnvironmentImplementation", "unmasked_by_user");
}
@@ -611,7 +611,7 @@ void expose_environment()
)
.def("unmasked_by_user", bp::pure_virtual(&EnvImp::unmasked_by_user),
- "unmasked_by_user(PackageID) -> bool\n"
+ "unmasked_by_user(PackageID, String) -> bool\n"
"Do we have a user unmask for a particular package?\n\n"
"This is only applied to repository and profile style masks, not\n"
"keywords, licences etc. If true, user_mask shouldn't be used."
diff --git a/python/environment_TEST.py b/python/environment_TEST.py
index 6b02ba02a..59a8bc516 100755
--- a/python/environment_TEST.py
+++ b/python/environment_TEST.py
@@ -102,7 +102,7 @@ class TestCase_04_Environment_subclassingd(unittest.TestCase):
def mask_for_user(self, pid, b):
return UserMask()
- def unmasked_by_user(self, pid):
+ def unmasked_by_user(self, pid, reason):
return False
def bashrc_files(self):