From 6e8bae2e88116af8791abde4298150ce371c4906 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 13 Apr 2013 18:07:14 +0200 Subject: [PATCH] add remove_module definition --- easybuild/tools/modules.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/easybuild/tools/modules.py b/easybuild/tools/modules.py index 3e9d84413c..0a46058e2d 100644 --- a/easybuild/tools/modules.py +++ b/easybuild/tools/modules.py @@ -180,6 +180,13 @@ def add_module(self, modules): self.log.warning('More then one module found for %s: %s' % (mod, mods)) continue + def remove_module(self, modules): + """ + Remove modules from list. + """ + for mod in modules: + self.modules = [m for m in self.modules if not m == mod] + def load(self): """ Load all requested modules.