diff options
| author | Harry (Open ERP) <hmo@tinyerp.com> | 2010-04-06 18:04:29 +0530 |
|---|---|---|
| committer | Harry (Open ERP) <hmo@tinyerp.com> | 2010-04-06 18:04:29 +0530 |
| commit | 85c42e9270d9689e08b2864a5292ae801ecbfd67 (patch) | |
| tree | d013befdb389847c9320f980f4e8ec824fda3bee /addons/document_webdav/DAV/errors.py | |
| parent | d07c7bc4d6f85d593071e1d5a4900771d32545d1 (diff) | |
| parent | aa70854c09a1e287342e830318c873131bf9744f (diff) | |
[MERGE]
bzr revid: hmo@tinyerp.com-20100406123429-hu7m4lnflo0amjr5
Diffstat (limited to 'addons/document_webdav/DAV/errors.py')
| -rwxr-xr-x | addons/document_webdav/DAV/errors.py | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/addons/document_webdav/DAV/errors.py b/addons/document_webdav/DAV/errors.py deleted file mode 100755 index 9c0e7667913..00000000000 --- a/addons/document_webdav/DAV/errors.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python -""" - - Exceptions for the DAVserver implementation - -""" - -class DAV_Error(Exception): - """ in general we can have the following arguments: - - 1. the error code - 2. the error result element, e.g. a <multistatus> element - """ - - def __init__(self,*args): - if len(args)==1: - self.args=(args[0],"") - else: - self.args=args - -class DAV_Secret(DAV_Error): - """ the user is not allowed to know anything about it - - returning this for a property value means to exclude it - from the response xml element. - """ - - def __init__(self): - DAV_Error.__init__(self,0) - pass - -class DAV_NotFound(DAV_Error): - """ a requested property was not found for a resource """ - - def __init__(self,*args): - if len(args): - if isinstance(args[0],list): - stre = "Path %s not found!"%('/'.join(args[0])) - else: - stre = args[0] - DAV_Error.__init__(self,404,stre) - else: - DAV_Error.__init__(self,404) - - pass - -class DAV_Forbidden(DAV_Error): - """ a method on a resource is not allowed """ - - def __init__(self,*args): - if len(args): - DAV_Error.__init__(self,403,args[0]) - else: - DAV_Error.__init__(self,403) - pass - |
