From d6f1efab03c8ebda71c37337870333889b43ea97 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Wed, 31 Jan 2018 10:59:51 +0000
Subject: [PATCH] Don't know why I didn't add this originally. WeakFunctionRef
 instance can be called() to get the function.

---
 fsl/utils/weakfuncref.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fsl/utils/weakfuncref.py b/fsl/utils/weakfuncref.py
index 19a9a3c5d..37e118566 100644
--- a/fsl/utils/weakfuncref.py
+++ b/fsl/utils/weakfuncref.py
@@ -132,6 +132,11 @@ class WeakFunctionRef(object):
         return None
 
 
+    def __call__(self):
+        """See :meth:``function``. """
+        return self.function()
+
+
     def function(self):
         """Return a reference to the encapsulated function or method,
         or ``None`` if the function has been garbage collected.
-- 
GitLab