Browse files

fix implementation of __setattr__

I was getting the exception

  Traceback (most recent call last):
    File ".\", line 20, in __init__
    File ".\", line 17, in __setattr__
  TypeError: super(type, obj): obj must be an instance or subtype of type

This is possibly due to __setattr__() being called at __init__() time,
mentioned in
  • Loading branch information...
1 parent 3fb1193 commit a18f48215a6017382230da321835d35f2c80fbf6 @rctay committed Jan 24, 2014
Showing with 1 addition and 5 deletions.
  1. +1 −5
@@ -7,14 +7,10 @@ class PipeViews(object):
def __setattr__(self, name, value):
if name is "enabled_setting":
value = value is None or value
- object.__setattr__(self, name, value)
- return
elif name is "scroll_setting":
value = value if value in set(["bottom", "top", "last"]) else "bottom"
- object.__setattr__(self, name, value)
- return
- return super(PipeViews, self).__setattr__(name, value)
+ object.__setattr__(self, name, value)
def __init__(self):
self.source_last_pos = 0

0 comments on commit a18f482

Please sign in to comment.