c3po/mod/communicator.py
def _upload_file_to_gdoc(
            self, file_path,
            content_type='application/x-vnd.oasis.opendocument.spreadsheet'):
        """
        Uploads file to GDocs spreadsheet.
        Content type can be provided as argument, default is ods.
        """
        try:
            entry = self.gd_client.GetResourceById(self.key)
            media = gdata.data.MediaSource(
                file_path=file_path, content_type=content_type)
            self.gd_client.UpdateResource(
                entry, media=media, update_metadata=True)
        except (RequestError, IOError) as e:
            raise PODocsError(e)
def _upload_file_to_gdoc(
            self, file_path,
            content_type='application/x-vnd.oasis.opendocument.spreadsheet'):
        """
        Uploads file to GDocs spreadsheet.
        Content type can be provided as argument, default is ods.
        """
        try:
            entry = self.gd_client.GetResourceById(self.key)
            media = gdata.data.MediaSource(
                file_path=file_path, content_type=content_type)
            self.gd_client.UpdateResource(
                entry, media=media, update_metadata=True)
        except (RequestError, IOError) as e:
            raise PODocsError(e)
def _upload_file_to_gdoc ( self , file_path , content_type = 'application/x-vnd.oasis.opendocument.spreadsheet' ) : try : entry = self . gd_client . GetResourceById ( self . key ) media = gdata . data . MediaSource ( file_path = file_path , content_type = content_type ) self . gd_client . UpdateResource ( entry , media = media , update_metadata = True ) except ( RequestError , IOError ) as e : raise PODocsError ( e )
Uploads file to GDocs spreadsheet.
        Content type can be provided as argument, default is ods.
Uploads file to GDocs spreadsheet . Content type can be provided as argument default is ods .