-
Notifications
You must be signed in to change notification settings - Fork 246
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 exception types raised from __getattr__ or __getattribute__ #71
Conversation
Only raise instances of AttributeError from __getattr__ or __getattribute__.
Thanks for the patch, but I've given it some thought and decided to reject it. First of all,
As for Why would you want to introspect the underlying file? Or a missing module? It doesn't make sense from an end-user point of view. |
Hi Tomer, first of all many thanks for providing RPyC. It is an amazing tool and I'll answer your last question first: I'm using Stackless Python During unpickling, the method pickle.Unpickler.load_build() from the From my understanding of I coded my patch April 2011 and tried to fix this problem for every Any chance to convince you to fix this problem? If not, I'll have no Am 22.03.2012 16:04, schrieb Tomer Filiba:
I know, its horrible. Do you have any other solution? At least both
I'm far from using the module directly. Therefore I can't argue about
Regards Dipl. Phys. Anselm Kruis science + computing ag phone +49 89 356386 874 fax 737 www.science-computing.deVorstandsvorsitzender/Chairman of the board of management: |
Okay, I've reopened the issue and i'll look further into it later on
|
I think I have a "cleaner" solution, please tell me what you think of it: For these two classes, Will this work for you? |
Hi Tomer, that's a clever idea. Maybe you should even check for '.*', because Regards Am 25.03.2012 16:09, schrieb Tomer Filiba:
Dipl. Phys. Anselm Kruis science + computing ag phone +49 89 356386 874 fax 737 www.science-computing.deVorstandsvorsitzender/Chairman of the board of management: |
Only raise instances of AttributeError from
getattr or getattribute.
There are a few cases, where RPyC raises exceptions other than AttributeError (or subclasses thereof) from getattr or getattribute. This breaks code, that uses i.e. getattr(object, name, default) because getattr now raises an exception instead of returning "default".