def __addcookies(self):
for cname, morsel in list(self.cookies.items()):<EOL><INDENT>attrs = []<EOL>value = morsel.get('<STR_LIT:version>', '<STR_LIT>')<EOL>if value != '<STR_LIT>' and value != '<STR_LIT:0>':<EOL><INDENT>attrs.append('<STR_LIT>' % value)<EOL><DEDENT>attrs.append('<STR_LIT>' % (cname, morsel.coded_value))<EOL>value = morsel.get('<STR_LIT:path>')<EOL>if value:<EOL><INDENT>attrs.append('<STR_LIT>' % value)<EOL><DEDENT>value = morsel.get('<STR_LIT>')<EOL>if value:<EOL><INDENT>attrs.append('<STR_LIT>' % value)<EOL><DEDENT>self.h.putheader('<STR_LIT>', "<STR_LIT>".join(attrs))<EOL><DEDENT>
Add cookies from self.cookies to request in self.h