Move motion exceptions to its own file in the motion app.

This commit is contained in:
Norman Jäckel 2013-02-14 19:27:36 +01:00
parent 2e37e4c18b
commit 8363b06fc1
2 changed files with 24 additions and 11 deletions

View File

@ -0,0 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
openslides.motion.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Exceptions for the motion app.
:copyright: (c) 2011-2013 by the OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
from openslides.utils.exceptions import OpenSlidesError
class MotionError(OpenSlidesError):
"""Exception raised when errors in the motion accure."""
pass
class WorkflowError(OpenSlidesError):
"""Exception raised when errors in a workflow or state accure."""
pass

View File

@ -24,7 +24,6 @@ from django.utils.translation import ugettext_lazy, ugettext_noop, ugettext as _
from openslides.utils.utils import _propper_unicode
from openslides.utils.person import PersonField
from openslides.utils.exceptions import OpenSlidesError
from openslides.config.models import config
from openslides.config.signals import default_config_value
from openslides.poll.models import (
@ -34,11 +33,7 @@ from openslides.projector.api import register_slidemodel
from openslides.projector.models import SlideMixin
from openslides.agenda.models import Item
class MotionError(OpenSlidesError):
"""Exception raised when errors in the motion accure."""
pass
from .exceptions import MotionError, WorkflowError
class Motion(SlideMixin, models.Model):
"""The Motion Class.
@ -629,11 +624,6 @@ class MotionPoll(CountInvalid, CountVotesCast, BasePoll):
CountVotesCast.append_pollform_fields(self, fields)
class WorkflowError(OpenSlidesError):
"""Exception raised when errors in a workflow or state accure."""
pass
class State(models.Model):
"""Defines a state for a motion.