VULN_CHECK_I913V6 9*bdZddlZGddeZGddeZGddeZGd d eZGd d eZGd deZGddeZ GddeZ GddeZ GddeZ y)z pyudev.device._errors ===================== Errors raised by Device methods. .. moduleauthor:: Sebastian Wiesner Nc(eZdZdZej Zy) DeviceErrorzP Any error raised when messing around w/ or trying to discover devices. N__name__ __module__ __qualname____doc__abcABCMeta __metaclass__3/usr/lib/python3.12/site-packages/pyudev/_errors.pyrrsKKMrrc(eZdZdZej Zy)DeviceNotFoundErrorz An exception indicating that no :class:`Device` was found. .. versionchanged:: 0.5 Rename from ``NoSuchDeviceError`` to its current name. Nrr rrrr&sKKMrrc,eZdZdZdZedZdZy)DeviceNotFoundAtPathErrorzh A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was found at a given path. c0tj||yNr__init__)selfsys_paths rrz"DeviceNotFoundAtPathError.__init__7s$$T84rc |jdS)z< The path that caused this error as string. rargsrs rrz"DeviceNotFoundAtPathError.sys_path: yy|rc8dj|jS)NzNo device at {0!r})formatrrs r__str__z!DeviceNotFoundAtPathError.__str__As#**4==99rN)rrrr rpropertyrr!r rrrr1s% 5 :rrceZdZdZy)DeviceNotFoundByFileErrorzp A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was found from the given filename. Nrrrr r rrr$r$Err$ceZdZdZy)#DeviceNotFoundByInterfaceIndexErrorzw A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was found from the given interface index. Nr%r rrr(r(Lr&rr(ceZdZdZy)!DeviceNotFoundByKernelDeviceErrorz A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was found from the given kernel device string. The format of the kernel device string is defined in the systemd.journal-fields man pages. Nr%r rrr*r*Ssrr*c<eZdZdZdZedZedZdZy)DeviceNotFoundByNameErrorzj A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was found with a given name. c2tj|||yrr)r subsystemsys_names rrz"DeviceNotFoundByNameError.__init__cs$$T9h?rc |jdS)zA The subsystem that caused this error as string. rrrs rr.z#DeviceNotFoundByNameError.subsystemfrrc |jdS)z@ The sys name that caused this error as string. rrs rr/z"DeviceNotFoundByNameError.sys_namemrrc$dj|S)Nz+No device {0.sys_name!r} in {0.subsystem!r}r rs rr!z!DeviceNotFoundByNameError.__str__ts<CCDIIrN) rrrr rr"r.r/r!r rrr,r,]s; @  Jrr,c<eZdZdZdZedZedZdZy)DeviceNotFoundByNumberErrorzs A :exc:`DeviceNotFoundError` indicating, that no :class:`Device` was found for a given device number. c2tj|||yrr)rtypnumbers rrz$DeviceNotFoundByNumberError.__init__~s$$T37rc |jdS)zj The device type causing this error as string. Either ``'char'`` or ``'block'``. rrrs r device_typez'DeviceNotFoundByNumberError.device_types yy|rc |jdS)zB The device number causing this error as integer. r2rrs r device_numberz)DeviceNotFoundByNumberError.device_numberrrc$dj|S)Nz7No {0.device_type} device with number {0.device_number}r4rs rr!z#DeviceNotFoundByNumberError.__str__sKRRSWXXrN) rrrr rr"r;r=r!r rrr6r6xs: 8 Yrr6ceZdZdZdZy) DeviceNotFoundInEnvironmentErrorz A :exc:`DeviceNotFoundError` indicating, that no :class:`Device` could be constructed from the process environment. cy)NzNo device found in environmentr rs rr!z(DeviceNotFoundInEnvironmentError.__str__s/rN)rrrr r!r rrr@r@s  0rr@c"eZdZdZdZddZdZy)DeviceValueErrorz Raised when a parameter has an unacceptable value. May also be raised when the parameter has an unacceptable type. z+value '%s' for parameter %s is unacceptableNc.||_||_||_y)z Initializer. :param object value: the value :param str param: the parameter :param str msg: an explanatory message N)_value_param_msg)rvalueparammsgs rrzDeviceValueError.__init__s   rc|jr5|jdz}||j|j|jfzS|j|j|jfzS)Nz: %s)rG_FMT_STRrErF)rfmt_strs rr!zDeviceValueError.__str__sQ 99mmf,Gdkk4;; BB B}} T[[999rr)rrrr rLrr!r rrrCrCs =H :rrC) r r Exceptionrrrr$r(r*r,r6r@rCr rrrOs"  )  + : 3:( 3*=(;J 3J6Y"5Y80':0:{:r