mς MγΈEc@swdkZdklZdkZdkZdklZdklZl Z dfd„ƒYZ e ƒZ dZ d„ZdS( N(sStringIO(s ZRPCError(slogs short_reprt MarshallercBs tZdZd„Zd„ZRS(s5Marshal requests and replies to second across networkcCs4tidƒ}d|_|i||||fdƒS(sReturns an encoded messageiN( tcPickletPicklertpicklertfasttdumptmsgidtflagstnametargs(tselfRRRR R((t//data/zmath/zope/lib/python/ZEO/zrpc/marshal.pytencodes  cCsZtit|ƒƒ}t|_y|iƒSWn'tdt|ƒdt i ƒ‚nXdS(s!Decodes msg and returns its partsscan't decode message: %stlevelN( Rt UnpicklertStringIOtmsgt unpicklert find_globaltloadtlogt short_reprtloggingtERROR(R RR((R tdecode,s  (t__name__t __module__t__doc__R R(((R Rs  RcCsοyt|tttƒ}Wn+tj o}td||fƒ‚nXyt||ƒ}Wn)t j otd||fƒ‚nXt|ddƒ}|o|Snt |ƒtijot|tƒo|Sntd||fƒ‚dS(sHelper for message unpicklersimport error %s: %ssmodule %s has no global %st__no_side_effects__isUnsafe global: %s.%sN(t __import__tmodulet_globalst_sillytmt ImportErrorRt ZRPCErrortgetattrRtrtAttributeErrortsafettypettypest ClassTypet issubclasst Exception(RRR'R!R%R((R R;s&(s__doc__(Rt cStringIORR)RtZEO.zrpc.errorR#t ZEO.zrpc.logRRRtglobalsRR R( RRRRRRRR R#RR)((R t?s     "