Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix TypeError: super(type, obj): obj must be an instance or subtype issue #688

Closed
wants to merge 1 commit into from

Conversation

jamie-liu
Copy link

When run diamond with ceph, collector CephStatsCollector is failed to load due to "TypeError: super(type, obj): obj must be an instance or subtype of type".
According to the link, it's because the repeated calls to load_module act as a reload, the objects created using the old class no longer satisfy the isinstance test, so super will fail.
So remove super from code and call parent class instead.

@coveralls
Copy link

coveralls commented Dec 7, 2017

Coverage Status

Coverage increased (+0.04%) to 24.703% when pulling 237d637 on jamie-liu:master into f2bece4 on python-diamond:master.

@shortdudey123
Copy link
Member

Since every collector uses the same super calls, I think you have run across a bigger issue. Other collectors don't have this issue as far as I know. If you still see this, open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants