Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
python3-dmapi-el9 / usr / lib / python3.9 / site-packages / dmapi / __pycache__ / exception_wrapper.cpython-39.pyc
Size: Mime:
a

[r`e­ã@s¤ddlZddlZddlmZddlZddlmZddlmZddl	m
Z
ddlmZddlmZej
jZdd	„Zejd
d„ƒZdd
„Zddd„Zdd„Zdd„ZdS)éN)Úexcutils)Úbase)Ú	exception)Úfields)Úrpc)Ú
safe_utilscCs t|||||ƒt|||ƒdS©N)Ú#_emit_legacy_exception_notificationÚ&_emit_versioned_exception_notification)ÚnotifierÚcontextÚexÚ
function_nameÚargsÚsource©rú;/usr/lib/python3.9/site-packages/dmapi/exception_wrapper.pyÚ_emit_exception_notifications
ÿrcCsRtj |¡}tjtj|d}tjdtj	j
d}tj||tjj
|d}| |¡dS)N)ÚhostrZcompute)ÚobjectÚaction)Ú	publisherÚ
event_typeÚpriorityÚpayload)rZExceptionPayloadÚfrom_exceptionrZNotificationPublisherÚCONFrZ	EventTyperZNotificationActionZ	EXCEPTIONZExceptionNotificationZNotificationPriorityZERRORÚemit)rr
rZversioned_exception_payloadrrZnotificationrrrr
sþür
cCst||d}| |||¡dS)N)rr)ÚdictÚerror)rrr
rrrrrrr	*sr	cs‡‡‡fdd„}|S)zšThis decorator wraps a method to catch any exceptions that may
    get thrown. It also optionally sends the exception to the notification
    system.
    cs ‡‡‡‡fdd„}t ˆ¡|ƒS)Ncs¬zˆ||g|¢Ri|¤ŽWSty¦}ztt ¡Pˆs<ˆrttˆ||g|¢Ri|¤Ž}ˆj}tˆpfˆƒ||||ˆƒWdƒn1sˆ0YWYd}~n
d}~00dSr)Ú	ExceptionrZsave_and_reraise_exceptionÚ_get_call_dictÚ__name__r)ÚselfrrÚkwÚeÚ	call_dictr)ÚbinaryÚfÚget_notifierrrrÚwrapped6s"
ÿÿÿþz.wrap_exception.<locals>.inner.<locals>.wrapped)Ú	functoolsÚwraps)r(r*©r'r)r)r(rÚinner5szwrap_exception.<locals>.innerr)rr)r'r.rr-rÚwrap_exception0sr/cOsFt |¡}tj|||g|¢Ri|¤Ž}| dd¡| dd¡t|ƒS)Nr#r)rZget_wrapped_functionÚinspectZgetcallargsÚpopÚ
_cleanse_dict)Úfunctionr#rrr$Zwrapped_funcr&rrrr!Is
ÿÿÿr!cCsdd„t| ¡ƒDƒS)zAStrip all admin_password, new_pass, rescue_pass keys from a dict.cSsi|]\}}d|vr||“qS)Z_passr)Ú.0ÚkÚvrrrÚ
<dictcomp>Yóz!_cleanse_dict.<locals>.<dictcomp>)ÚlistÚitems)Úoriginalrrrr2Wsr2)NNN)r+r0Z
oslo_utilsrZ
dmapi.confZdmapiZdmapi.notifications.objectsrrZ
dmapi.objectsrrrZconfrrZif_notifications_enabledr
r	r/r!r2rrrrÚ<module>s