Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- print 'uploading %s' % (val)
- feed = gd_client.GetSpreadsheetsFeed()
- sheet_key = feed.entry[0].id.text.rsplit('/', 1)[1]
- work_feed = gd_client.GetWorksheetsFeed(sheet_key)
- work_key = work_feed.entry[0].id.text.rsplit('/', 1)[1]
- ListInsertAction(gd_client, sheet_key, work_key {'time':time.strftime(fmt),'humidity':str(First_val),'temp':str(Second_val),'co2':str(Third_val)})
- except socket.gaierror:
- # Re-login to see if we can fix the broken socket and then re-send
- gd_client.ProgrammaticLogin()
- print 'uploading %s' % (val)
- feed = gd_client.GetSpreadsheetsFeed()
- sheet_key = feed.entry[0].id.text.rsplit('/', 1)[1]
- work_feed = gd_client.GetWorksheetsFeed(sheet_key)
- work_key = work_feed.entry[0].id.text.rsplit('/', 1)[1]
- ListInsertAction(gd_client, sheet_key, work_key {'time':time.strftime(fmt),'humidity':str(First_val),'temp':str(Second_val),'co2':str(Third_val)})
Advertisement
Add Comment
Please, Sign In to add comment