Omkar008 commited on
Commit
0f607c6
1 Parent(s): 9be805d

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +3 -2
test.py CHANGED
@@ -72,7 +72,7 @@ async def auth_google(request: Request):
72
  # Fetch attachments from the first message
73
  attachments = []
74
  attachment_no = 0
75
- data_new = []
76
  for i,message in enumerate(messages) :
77
  print(i)
78
  print(message)
@@ -97,7 +97,8 @@ async def auth_google(request: Request):
97
  filename = part.get("filename", "untitled.txt")
98
 
99
  if data:
100
- data_new.append({filename:data.encode("UTF-8")})
 
101
  # Decode base64-encoded attachment data
102
  attachment_content = base64.urlsafe_b64decode(data.encode("UTF-8"))
103
  # print(attachment_content)
 
72
  # Fetch attachments from the first message
73
  attachments = []
74
  attachment_no = 0
75
+ data_new = {}
76
  for i,message in enumerate(messages) :
77
  print(i)
78
  print(message)
 
97
  filename = part.get("filename", "untitled.txt")
98
 
99
  if data:
100
+ data_new[filename]=data.encode("UTF-8")
101
+ # data_new.append({filename:data.encode("UTF-8")})
102
  # Decode base64-encoded attachment data
103
  attachment_content = base64.urlsafe_b64decode(data.encode("UTF-8"))
104
  # print(attachment_content)