~ubuntu-branches/ubuntu/vivid/ceilometer/vivid-proposed

« back to all changes in this revision

Viewing changes to ceilometer/openstack/common/db/exception.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2014-06-13 13:20:35 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20140613132035-42ibzh8j7ww2q31i
Tags: 2014.2~b1-0ubuntu1
* New upstream release.
* debian/control: Open up juno release
* debian/patches/fix-requirements.patch: Refreshed.
* debian/rules: Patch the ceilometer.conf.sample directly since
  the configuration files are generated by a tool.
* debian/ceilometer-common.install: Drop sources.json.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""DB related custom exceptions."""
18
18
 
 
19
import six
 
20
 
19
21
from ceilometer.openstack.common.gettextutils import _
20
22
 
21
23
 
23
25
    """Wraps an implementation specific exception."""
24
26
    def __init__(self, inner_exception=None):
25
27
        self.inner_exception = inner_exception
26
 
        super(DBError, self).__init__(str(inner_exception))
 
28
        super(DBError, self).__init__(six.text_type(inner_exception))
27
29
 
28
30
 
29
31
class DBDuplicateEntry(DBError):
46
48
class DbMigrationError(DBError):
47
49
    """Wraps migration specific exception."""
48
50
    def __init__(self, message=None):
49
 
        super(DbMigrationError, self).__init__(str(message))
 
51
        super(DbMigrationError, self).__init__(message)
50
52
 
51
53
 
52
54
class DBConnectionError(DBError):