Skip to content

Commit

Permalink
writing test file when attachment is delivered
Browse files Browse the repository at this point in the history
  • Loading branch information
uncamy committed Dec 9, 2013
1 parent bda8e87 commit dab7885
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion notify/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
from model import Credentials
import util

def write2file():
im = open('attachment.txt', 'wb')
im.write ('writing stuff')
im.close()

class NotifyHandler(webapp2.RequestHandler):
"""Request Handler for notification pings."""
Expand Down Expand Up @@ -78,7 +82,7 @@ def _handle_timeline_notification(self, data):
media = MediaIoBaseUpload(
io.BytesIO(content), attachment['contentType'],
resumable=True)
print content
write2file()
else:
logging.info('Unable to retrieve attachment: %s', resp.status)
body = {
Expand Down

0 comments on commit dab7885

Please sign in to comment.