Changeset 569 for trunk/email2trac.py.in
- Timestamp:
- 09/13/11 16:07:06 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/email2trac.py.in
r564 r569 1918 1918 continue 1919 1919 1920 ## Check if this is an inline part. It's inline if there is co Cont-Disp header, or if there is one and it says "inline" 1920 ## Check if this is an inline part. It's inline if there is co Cont-Disp header, 1921 # or if there is one and it says "inline" 1921 1922 # 1922 1923 inline = self.inline_part(part) … … 1931 1932 continue 1932 1933 1934 filename = part.get_filename() 1935 s = '\t unicode filename: %s' %(filename) 1936 self.print_unicode(s) 1937 self.logger.debug('\t raw filename: %s' %repr(filename)) 1938 1939 filename = self.check_filename_length(filename) 1933 1940 1934 1941 ## Save all non plain text message as attachment … … 1936 1943 if not content_type in ['text/plain']: 1937 1944 1938 filename = part.get_filename() 1939 1940 s = '\t unicode filename: %s' %(filename) 1941 self.print_unicode(s) 1942 self.logger.debug('\t raw filename: %s' %repr(filename)) 1943 1944 # 11 Aug 2011 -> Obsolete code 1945 ## First try to use email header function to convert filename. 1946 # If this fails the use the plain filename 1947 # 1948 #name = part.get_filename() 1949 #try: 1950 # print repr(name), len(name) 1951 # filename = self.email_to_unicode(part.get_filename()) 1952 # print "Bas: ", repr(filename), len(filename) 1953 #except UnicodeEncodeError, detail: 1954 # print "Bas", repr(detail) 1955 # filename = part.get_filename() 1956 1957 message_parts.append( (self.check_filename_length(filename), part) ) 1958 1959 ## We van only convert html messages 1945 message_parts.append( (filename, part) ) 1946 1947 ## We only convert html messages 1960 1948 # 1961 1949 if not content_type == 'text/html': 1962 self.logger.debug('\t Appending content_type = %s' %(content_type))1950 self.logger.debug('\t Appending %s (%s)' %(repr(filename), content_type)) 1963 1951 continue 1964 1952 1953 1954 ## We have an text or html message 1955 # 1965 1956 if not inline: 1966 self.logger.debug('\t Skipping %s, not an inline messsage part' %(content_type)) 1957 self.logger.debug('\t Appending %s (%s), not an inline messsage part' %(repr(filename), content_type)) 1958 message_parts.append( (filename, part) ) 1967 1959 continue 1968 1960 … … 2271 2263 notification. 2272 2264 """ 2265 #print sender_email, resid 2273 2266 (torcpts, ccrcpts) = self.get_recipients(resid) 2274 2275 print torcpts, ccrcpts, sender_email 2267 #print "get_recipients finished" 2276 2268 2277 2269 if not tktparser.email_header_acl('notify_reporter_black_list', sender_email, False):
Note: See TracChangeset
for help on using the changeset viewer.