[pytango] 73/122: Fix callable check with python3

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:18:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to tag v9.2.1
in repository pytango.

commit 7c3f3ecdf5494f74927a57d463cca956644535b9
Author: Vincent Michel <vincent.michel at maxlab.lu.se>
Date:   Mon Oct 17 19:42:44 2016 +0200

    Fix callable check with python3
---
 tango/server.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tango/server.py b/tango/server.py
index 615d0aa..13c0d6e 100644
--- a/tango/server.py
+++ b/tango/server.py
@@ -26,7 +26,6 @@ import types
 import inspect
 import logging
 import weakref
-import operator
 import functools
 import traceback
 
@@ -1296,14 +1295,14 @@ def __to_cb(post_init_callback):
 
     err_msg = "post_init_callback must be a callable or " \
               "sequence <callable [, args, [, kwargs]]>"
-    if operator.isCallable(post_init_callback):
+    if callable(post_init_callback):
         f = post_init_callback
     elif is_non_str_seq(post_init_callback):
         length = len(post_init_callback)
         if length < 1 or length > 3:
             raise TypeError(err_msg)
         cb = post_init_callback[0]
-        if not operator.isCallable(cb):
+        if not callable(cb):
             raise TypeError(err_msg)
         args, kwargs = [], {}
         if length > 1:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list