Commit a43717a3 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Refactoring for exceptions.

parent 30114168
# Import general commission framework
from .exception import (CallError,
CommissionException,
CorruptedError,
InvalidDataError,
InvalidKeyError,
NoEntityError,
NoQuantityError,
NoCapacityError,
ExportLimitError,
ImportLimitError)
from .exception import CallError, CorruptedError, InvalidDataError
from .callpoint import Callpoint, get_callpoint, mkcallargs
......
......@@ -47,31 +47,8 @@ class CallError(Exception):
self = cls(*args, call_error=call_error)
return self
class CommissionException(CallError):
pass
class CorruptedError(CommissionException):
pass
class InvalidDataError(CommissionException):
pass
class InvalidKeyError(CommissionException):
pass
class NoEntityError(CommissionException):
pass
class NoQuantityError(CommissionException):
pass
class NoCapacityError(CommissionException):
pass
class ExportLimitError(CommissionException):
class CorruptedError(CallError):
pass
class ImportLimitError(CommissionException):
class InvalidDataError(CallError):
pass
from .quotaholder import QuotaholderAPI
from .exception import ( InvalidKeyError, NoEntityError,
NoQuantityError, NoCapacityError,
ExportLimitError, ImportLimitError)
API_Spec = QuotaholderAPI
from commissioning import CallError
class CommissionException(CallError):
pass
class InvalidKeyError(CommissionException):
pass
class NoEntityError(CommissionException):
pass
class NoQuantityError(CommissionException):
pass
class NoCapacityError(CommissionException):
pass
class ExportLimitError(CommissionException):
pass
class ImportLimitError(CommissionException):
pass
from quotaholder.api import QuotaholderAPI
from commissioning import ( Callpoint, CommissionException,
CorruptedError, InvalidDataError,
from quotaholder.api import (
InvalidKeyError, NoEntityError,
NoQuantityError, NoCapacityError,
ExportLimitError, ImportLimitError)
from commissioning import Callpoint, CorruptedError, InvalidDataError
from commissioning.utils.newname import newname
from django.db.models import Model, BigIntegerField, CharField, ForeignKey, Q
from django.db import transaction, IntegrityError
......
from commissioning import ( Callpoint,
CommissionException,
CorruptedError, InvalidDataError,
InvalidKeyError, NoEntityError,
NoQuantityError, NoCapacityError )
from commissioning import CorruptedError
from django.db.models import Model, BigIntegerField, CharField, ForeignKey
from django.db import transaction
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment