~canonical-platform-qa/checkbox/lbuilding-on-oauth-community-testing-take2

« back to all changes in this revision

Viewing changes to plainbox/plainbox/impl/session/assistant.py

  • Committer: Christopher Lee
  • Date: 2015-09-25 04:56:01 UTC
  • Revision ID: chris.lee@canonical.com-20150925045601-u1n819v22umlb6p7
checkbox-touch: Added sso-auth dialog for Ubuntu community testing upload

Show diffs side-by-side

added added

removed removed

Lines of Context:
1101
1101
 
1102
1102
    @raises(KeyError, TransportError, UnexpectedMethodCall)
1103
1103
    def export_to_transport(
1104
 
        self, exporter_id: str, transport: ISessionStateTransport
 
1104
            self,
 
1105
            exporter_id: str,
 
1106
            transport: ISessionStateTransport,
 
1107
            options: 'list[str]'=[]
1105
1108
    ) -> dict:
1106
1109
        """
1107
1110
        Export the session using given exporter ID and transport object.
1116
1119
            that is useful for sending data to the Canonical Certification
1117
1120
            Website and HEXR. This can also be any object conforming to the
1118
1121
            appropriate API.
 
1122
        :param options:
 
1123
            (optional) List of options customary to the exporter that is being
 
1124
            created.
1119
1125
        :returns:
1120
1126
            pass
1121
1127
        :raises KeyError:
1128
1134
            is the likely cause.
1129
1135
        """
1130
1136
        UsageExpectation.of(self).enforce()
1131
 
        exporter = self._manager.create_exporter(exporter_id)
 
1137
        exporter = self._manager.create_exporter(exporter_id, options)
1132
1138
        exported_stream = io.BytesIO()
1133
1139
        exporter.dump_from_session_manager(self._manager, exported_stream)
1134
1140
        exported_stream.seek(0)