File: ServerError.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 (7 lines) | stat: -rw-r--r-- 201 bytes parent folder | download
1
2
3
4
5
6
7
import json

class ServerError(Exception):
    
    def __init__(self, data, *args, **kwargs):
        data = json.loads(data)
        super(ServerError, self).__init__(data["error"], *args, **kwargs)