Debian Codegraph @

gphoto2cffi/errors.py

raw symbols SCIP
1 def error_from_codescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode)):
2 from .backendscip-python python gphoto2-cffi 0.4.2 backend/__init__: import ffi, libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib.
3 if errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_CORRUPTED_DATA:
4 return CameraIOErrorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraIOError#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode), "Corrupted data received.")
5 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_FILE_EXISTS:
6 return CameraIOErrorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraIOError#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode), "File already exists.")
7 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_FILE_NOT_FOUND:
8 return CameraIOErrorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraIOError#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode), "File not found.")
9 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_DIRECTORY_NOT_FOUND:
10 return CameraIOErrorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraIOError#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode), "Directory not found.")
11 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_DIRECTORY_EXISTS:
12 return CameraIOErrorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraIOError#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode), "Directory already exists.")
13 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_NO_SPACE:
14 return CameraIOErrorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraIOError#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode), "Not enough space.")
15 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_MODEL_NOT_FOUND:
16 return UnsupportedDevicescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/UnsupportedDevice#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode))
17 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_CAMERA_BUSY:
18 return CameraBusyscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraBusy#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode))
19 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_PATH_NOT_ABSOLUTE:
20 return ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#("Specified path is not absolute.")
21 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_CANCEL:
22 return OperationCancelledscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/OperationCancelled#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode))
23 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_CAMERA_ERROR:
24 return CameraErrorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraError#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode), "Unspecified camera error.")
25 elif errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode) == libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..GP_ERROR_OS_FAILURE:
26 return OSErrorscip-python python python-stdlib 3.11 builtins/OSError#("Unspecified failure of the operation system.")
27 else:
28 return GPhoto2Errorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode),
29 ffi.string(libscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.backend`/lib..gp_result_as_string(errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/error_from_code().(errcode))))
30
31
32 class GPhoto2Errorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#(Exceptionscip-python python python-stdlib 3.11 builtins/Exception#):
33 def __init__scip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#__init__().(selfscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#__init__().(self), errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#__init__().(errcode)=None, messagescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#__init__().(message)=None):
34 """ Generic exception type for all errors that originate in libgphoto2.
35
36 Converts libgphoto2 error codes to their human readable message.
37
38 :param errcode: The libgphoto2 error code
39 """
40 selfscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#__init__().(self).error_codescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#error_code. = errcodescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#__init__().(errcode)
41 if messagescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#__init__().(message):
42 superscip-python python python-stdlib 3.11 builtins/super#(GPhoto2Errorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#, selfscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#__init__().(self)).__init__scip-python python python-stdlib 3.11 builtins/BaseException#__init__().(messagescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#__init__().(message))
43
44
45 class CameraIOErrorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraIOError#(GPhoto2Errorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#, IOErrorscip-python python python-stdlib 3.11 builtins/IOError#):
46 """ IOError on the camera itself. """
47 pass
48
49
50 class UnsupportedDevicescip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/UnsupportedDevice#(GPhoto2Errorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#):
51 """ Specified camera model was not found.
52
53 The specified model could not be found. This error is reported when the
54 user specified a model that does not seem to be supported by any driver.
55 """
56 pass
57
58
59 class CameraBusyscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraBusy#(GPhoto2Errorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#):
60 """ The camera is already busy.
61
62 Camera I/O or a command is in progress.
63 """
64 pass
65
66
67 class OperationCancelledscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/OperationCancelled#(GPhoto2Errorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#):
68 """ Cancellation successful.
69
70 A cancellation requestion by the frontend via progress callback and
71 GP_CONTEXT_FEEDBACK_CANCEL was successful and the transfer has been
72 aborted.
73 """
74 pass
75
76
77 class CameraErrorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/CameraError#(GPhoto2Errorscip-python python gphoto2-cffi 0.4.2 `gphoto2cffi.errors`/GPhoto2Error#):
78 """ Unspecified camera error
79
80 The camera reported some kind of error. This can be either a photographic
81 error, such as failure to autofocus, underexposure, or violating storage
82 permission, anything else that stops the camera from performing the
83 operation.
84 """
85 pass