• File: decorators.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/lib/python2.7/site-packages/firewall/server/decorators.pyc
  • Date Modified: 05/01/2021 12:21 PM
  • File size: 2.59 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

G`c@sdZddddgZddlZddlZddlZddlmZddlmZdd	lm	Z	dd
l
mZddlmZddl
mZdejfd
YZedZedZdZdS(s>This module contains decorators for use with and without D-BustFirewallDBusExceptionthandle_exceptionstdbus_handle_exceptionstdbus_service_methodiN(t
DBusException(t	decorator(tconfig(t
FirewallError(terrors(tlogcBseZdZdejjZRS(Rs%s.Exception(t__name__t
__module__t__doc__RtdbustDBUS_INTERFACEt_dbus_error_name(((s>/usr/lib/python2.7/site-packages/firewall/server/decorators.pyR+scOsxy|||SWn`tk
rF}tjtjtj|n.tk
rstjtjtjnXdS(sTDecorator to handle exceptions and log them. Used if not conneced
    to D-Bus.
    N(RR	tdebug1t	tracebackt
format_excterrort	Exceptiont	exception(tfunctargstkwargsR((s>/usr/lib/python2.7/site-packages/firewall/server/decorators.pyR/s
cOsy|||SWntk
r}tjt|}|tjtjtjtjgkrrtj	t|n&tj
tjtj
t|tt|nZtk
r}|nBtk
r}tj
tjtjtt|nXdS(sDecorator to handle exceptions, log and report them into D-Bus

    :Raises DBusException: on a firewall error code problems.
    N(Rtget_codetstrRtALREADY_ENABLEDtNOT_ENABLEDtZONE_ALREADY_SETtALREADY_SETR	twarningRRRRRRRR(RRRRtcodetex((s>/usr/lib/python2.7/site-packages/firewall/server/decorators.pyR=s 	
cOs#|jddtjj||S(sAdd sender argument for D-Bustsender_keywordtsender(t
setdefaultR
tservicetmethod(RR((s>/usr/lib/python2.7/site-packages/firewall/server/decorators.pyRVs(Rt__all__R
tdbus.serviceRtdbus.exceptionsRRtfirewallRtfirewall.errorsRRtfirewall.core.loggerR	RRRR(((s>/usr/lib/python2.7/site-packages/firewall/server/decorators.pyt<module>s