-
Notifications
You must be signed in to change notification settings - Fork 9
Iso8583 v1.3.5 #2
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
Conversation
…it types A, N, and ANS, ValueTypeError raised when trying to set a value that is not a valid type
|
Hello @ducminhgd, have you had any answer about the merge request?
Regards.
…On Dec 20, 2017 10:29, "Giã Dương Đức Minh" ***@***.***> wrote:
@dat07cs <https://github.com/dat07cs>, I do not maintain this repository
anymore, please help me to verify if this update from @R2RITO
<https://github.com/r2rito> resolves issues that he or she mentioned or
not.
Thank you both!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFP09egonxWSEG37GE9QjlrIIb4IRD0zks5tCRnQgaJpZM4RIcBa>
.
|
ISO8583/ISO8583.py
Outdated
| raise ValueToLarge('Error: value up to size! Bit[%s] of type %s limit size = %s' % ( | ||
| bit, self.getBitType(bit), self.getBitLimit(bit))) | ||
|
|
||
| if not value.isalpha(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit Type A can have alpha, including blank, characters
ISO8583/ISO8583.py
Outdated
| raise ValueToLarge('Error: value up to size! Bit[%s] of type %s limit size = %s' % ( | ||
| bit, self.getBitType(bit), self.getBitLimit(bit))) | ||
|
|
||
| if not value.isalnum(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit Type ANS can have alphanumeric and special characters
ISO8583/ISO8583.py
Outdated
| if bitType == 'N' and not value.isdecimal(): | ||
| self.__raiseValueTypeError(cont) | ||
|
|
||
| if bitType == 'A' and not value.isalpha(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As said, bit type A can have blank character
ISO8583/ISO8583.py
Outdated
| bit, self.getBitType(bit), self.getBitLimit(bit))) | ||
|
|
||
| if not value.isdecimal(): | ||
| __raiseValueTypeError(bit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot self
dat07cs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- miss reference to "self" object
- bit type A can have blank character
- bit type ANS can have special characters
…idity, added function to set bits of type AN
R2RITO
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected the errors, added a new function and restructured some of the code. Please review.
Thanks
Added support for byte encoding on python3 in the getNetworkISO method since it is not automatically converted from bytes to ascii or unicode strings.
Added function to raise an InvalidValueType exception, used to avoid repeating code.
Added verification on type for the bit setting methods, on iso creation and on usage of setBit method. Bit type verification only for types A, N, ANS.