File: errors.py

package info (click to toggle)
ftp-cloudfs 0.25.2%2B20140217%2Bgit2a90c1a2eb-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 272 kB
  • ctags: 250
  • sloc: python: 2,032; sh: 120; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 638 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
Errors for ObjectStorageFS
"""

class IOSError(OSError, IOError):
    """
    Subclass of OSError and IOError.

    This is needed because pyftpdlib catches either OSError, or
    IOError depending on which operation it is performing, which is
    perfectly correct, but makes our life more difficult.

    However our operations don't map to simple functions, and have
    common infrastructure.  These common infrastructure functions can
    be called from either context and so don't know which error to
    raise.

    Using this combined type everywhere fixes the problem at very
    small cost (multiple inheritance!).
    """