-
Notifications
You must be signed in to change notification settings - Fork 10
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
AttributeError: can't set attribute #2
Comments
@akr8986 Currently python 3 support is not completely added. I am planning to add it. |
The issue seems to be with re_scan.py file.. The pattern object doesnt allow to set the value of groups variable..It auto-populates the variable value during execution.. i tried removing the line and executing the script.. it works fine... Not sure if its the right fix though!! |
I have tried it earlier. Test didn't pass. I am exploring it. Let me know if all tests pass with your solution. |
GIT DIFF:
UT Result:Results (1.82s):
The last assert seems wrong to me.. since both of them have same elements but only in a different order. am not sure about the other errors! |
Thanks for pointing out and debugging. I have updated interfaces property to return sorted list instead of directly returning from dictionary keys list. With it 2 testcases are fixed. I also focusing on rest to include python 3 support. Temporarily I am setting pattern groups len for python 2 only.
|
There are few more things for which support has to be added..
|
For inet6 i defined a new method:
For other two issues i did not see any other way other than creating new methods and new set of RegExp.. After modification my RegExp list fed to Scanner class is below:
process_RxTx method is simple..
and process_interface3 is just a copy of process_interface2.. i had to create a new method since Scanner class was cribbing about having same name (which is our func ptr).. |
Mostly I have added things as I found them, I havn't referred ifconfig(net-tools) source as such. Might have missed these flags. Of course, we can add as we explore.
As you have worked out we can add ipv6 support. Though will need to add testcases around this.
We can merge following regexes as there is only difference of optional ':' character.
Also you don't need to define separate
Can you share txt file of your output (may be filtered) ? Seems like
Thanks for all great findings, I would really appreciate if you raise pull request for your changes and I can also have deep look at changes. |
Hi, process_interface3 is just a copy of process_interface method.. scanner class was throwing an error if i tried to reuse the same method. I dint debug further why.. And the issue (which is solved by process_interface3) can be reproduced with the ifconfig output i have given above.. |
@akr8986 Can you please create pull request with your changes ? We will take this forward from there. |
Related #15 . Closing this for now. |
I am using python version 3.5
$ python --version
Python 3.5.1
I am facing the below error when i am importing the ifparser package i am seeing an attribute error:
The text was updated successfully, but these errors were encountered: