summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-09-20 21:04:04 -0700
committerJelmer Vernooij <jelmer@samba.org>2010-09-20 22:40:47 -0700
commit7fc40d2ed3ab378c409e6f868d75733352ed5ddf (patch)
tree384b1ec83ac707b6f2fce2100ae2b8caad73c9b7 /source4
parentc4c6f8f1755486056f77b9a7f830d10a9ebfb7b0 (diff)
downloadsamba-7fc40d2ed3ab378c409e6f868d75733352ed5ddf.tar.gz
samba-7fc40d2ed3ab378c409e6f868d75733352ed5ddf.tar.bz2
samba-7fc40d2ed3ab378c409e6f868d75733352ed5ddf.zip
pytestrpc: Be more verbose.
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/testrpc.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/tests/dcerpc/testrpc.py b/source4/scripting/python/samba/tests/dcerpc/testrpc.py
index d3f97d767e..d432d5abe1 100644
--- a/source4/scripting/python/samba/tests/dcerpc/testrpc.py
+++ b/source4/scripting/python/samba/tests/dcerpc/testrpc.py
@@ -57,7 +57,7 @@ class RpcTests(object):
print "Setting %s.%s" % (typename, n)
setattr(v, n, value)
except Exception, e:
- if issubclass(e, AttributeError) and str(e).endswith("is read-only"):
+ if isinstance(e, AttributeError) and str(e).endswith("is read-only"):
# readonly, ignore
continue
else:
@@ -68,7 +68,7 @@ class RpcTests(object):
# and try a comparison
try:
if value != getattr(v, n):
- print "ERROR: Comparison failed for %s.%s != %r" % (typename, n, value)
+ print "ERROR: Comparison failed for %s.%s: %r != %r" % (typename, n, value, getattr(v, n))
continue
except Exception, e:
print "ERROR: compare exception for %s.%s: %r: %s" % (typename, n, e.__class__, e)
@@ -92,9 +92,11 @@ class RpcTests(object):
initial_blocks = samba.talloc_total_blocks(None)
self.check_type(interface, n, value)
self.check_blocks(None, initial_blocks)
- except:
- print "ERROR: Failed to check_type %s.%s" % (iname, n)
+ except Exception, e:
+ print "ERROR: Failed to check_type %s.%s: %r: %s" % (iname, n, e.__class__, e)
self.errcount += 1
+ elif callable(value):
+ pass # Method
else:
print "UNKNOWN: %s=%s" % (n, value)
if self.errcount - errcount != 0: