File: ImmutableException.py

package info (click to toggle)
python-pypump 0.3%2Bgit20130823.1.97bffc6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 328 kB
  • ctags: 333
  • sloc: python: 1,630; makefile: 140; sh: 7
file content (8 lines) | stat: -rw-r--r-- 277 bytes parent folder | download
1
2
3
4
5
6
7
8

class ImmutableException(Exception):

    message = "You can't set %s on %s, the object is immutable."

    def __init__(self, item, obj, *args, **kwargs):
        message = self.message % (item, obj)
        super(ImmutableException, self).__init__(message, *args, **kwargs)