Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# pycharm
.idea
.vscode
1,439 changes: 1,088 additions & 351 deletions ISO8583/ISO8583.py
100755 → 100644

Large diffs are not rendered by default.

24 changes: 21 additions & 3 deletions ISO8583/ISOErrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
""" Class used do inform errors.
"""
#Exception used to indicate that the value that setting in the bit is large than the iso limit to that bit!
class ValueToLarge(Exception):
class ValueTooLarge(Exception):
"""Exeption that indicate that a value that want to set inside the bit is large than the "ISO" limit.
This can happen when you have a different specification of mine.
If this is the case, you should use "ISO8583.redefineBit()" method and redefine the limit.
Expand All @@ -32,7 +32,7 @@ def __str__(self):


#Exception to indicate that bit dosen't Exist!
class BitInexistent(Exception):
class BitNonexistent(Exception):
"""Exeption that indicate that a bit that you try to manage dosen't exist!
Try to check your "setBit". Remember that ISO8583 1993 has only bits from 1 to 128!
"""
Expand Down Expand Up @@ -82,11 +82,29 @@ def __init__(self, value):
def __str__(self):
return repr(self.str)

#Exception that indicate a invalid Format
class InvalidFormat(Exception):
"""Exception that indicate an invalid Format
"""
def __init__(self, value):
self.str = value
def __str__(self):
return repr(self.str)

#Exception that indicate a invalid Length Format
class InvalidLenForm(Exception):
"""Exception that indicate an invalid Length Format
"""
def __init__(self, value):
self.str = value
def __str__(self):
return repr(self.str)

#Exception that indicate that bit is not there.
class BitNotSet(Exception):
"""Exception that indicate that you try to access a bit not present in the bitmap.
"""
def __init__(self, value):
self.str = value
def __str__(self):
return repr(self.str)
return repr(self.str)
Loading