ó ó2Vc@s¦ddlZddlZejddkZerkeZeZddlm Z d„Z d„Z d„Z n7eZeZddlm Z d „Z d „Z d „Z dS( iÿÿÿÿNii(t izip_longestcCs"|j|_d„}||_|S(s@Class decorator that handles __str__ compat between py2 and py3.cSs|jƒjdƒS(Nsutf-8(t __unicode__tencode(tself((s0/usr/lib/fence-agents/bundled/jmespath/compat.pyt__str__s(RR(tclsR((s0/usr/lib/fence-agents/bundled/jmespath/compat.pytwith_str_method s   cs%|j‰‡fd†}||_|S(s6Class decorator that handle __repr__ with py2 and py3.cs1ˆ|ƒ}t|tƒr-|jdƒ}n|S(Ntunicode_escape(t isinstancet text_typeR(Rt original_repr(toriginal_repr_method(s0/usr/lib/fence-agents/bundled/jmespath/compat.pyt__repr__s (R (RR ((R s0/usr/lib/fence-agents/bundled/jmespath/compat.pytwith_repr_methods  ccs8x1tj|dtjƒD]\}}||fVqWdS(Nt predicate(tinspectt getmemberstismethod(Rtnametmethod((s0/usr/lib/fence-agents/bundled/jmespath/compat.pyt get_methods$s(t zip_longestcCs|S(N((R((s0/usr/lib/fence-agents/bundled/jmespath/compat.pyR.scCs|S(N((R((s0/usr/lib/fence-agents/bundled/jmespath/compat.pyR 2sccs8x1tj|dtjƒD]\}}||fVqWdS(NR(RRt isfunction(RRR((s0/usr/lib/fence-agents/bundled/jmespath/compat.pyR5s(tsysRt version_infotPY2tunicodeR t basestringt string_typet itertoolsRRRR Rtstr(((s0/usr/lib/fence-agents/bundled/jmespath/compat.pyts