Mercurial > libervia-web
diff src/browser/sat_browser/plugin_sec_otr.py @ 662:ebb602d8b3f2 frontends_multi_profiles
browser_side: replace all instances of 'str' with 'unicode'
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 03 Mar 2015 06:51:13 +0100 |
parents | 9092e624bb27 |
children | 423182fea41c |
line wrap: on
line diff
--- a/src/browser/sat_browser/plugin_sec_otr.py Tue Mar 03 06:24:27 2015 +0100 +++ b/src/browser/sat_browser/plugin_sec_otr.py Tue Mar 03 06:51:13 2015 +0100 @@ -135,7 +135,7 @@ def getPolicy(self, key): """Get the value of the specified policy - @param key (str): a value in: + @param key (unicode): a value in: - ALLOW_V1 (apriori removed from otr.js) - ALLOW_V2 - ALLOW_V3 @@ -143,7 +143,7 @@ - SEND_WHITESPACE_TAG - WHITESPACE_START_AKE - ERROR_START_AKE - @return: str + @return: unicode """ if key in DEFAULT_POLICY_FLAGS: return DEFAULT_POLICY_FLAGS[key] @@ -242,11 +242,11 @@ def smpAuthCb(self, type_, data, act=None): """OTR v3 authentication using the socialist millionaire protocol. - @param type_ (str): a value in ('question', 'trust', 'abort') - @param data (str, bool): this could be: + @param type_ (unicode): a value in ('question', 'trust', 'abort') + @param data (unicode, bool): this could be: - a string containing the question if type_ is 'question' - a boolean value telling if the authentication succeed when type_ is 'trust' - @param act (str): a value in ('asked', 'answered') + @param act (unicode): a value in ('asked', 'answered') """ log.debug("smpAuthCb: type={type}, data={data}, act={act}".format(type=type_, data=data, act=act)) if act is None: @@ -369,9 +369,9 @@ def getInfoText(self, state=otr.context.STATE_PLAINTEXT, trust=''): """Get the widget info text for a certain message state and trust. - @param state (str): message state - @param trust (str): trust - @return: str + @param state (unicode): message state + @param trust (unicode): trust + @return: unicode """ if not state: state = OTR_MSG_STATES.keys()[0] @@ -492,7 +492,7 @@ def endSession(self, other_jid, profile, finish=False): """Finish or disconnect an OTR session - @param other_jid (jid.JID): str + @param other_jid (jid.JID): contact JID @param finish: if True, finish the session but do not disconnect it @return: True if the session has been finished or disconnected, False if there was nothing to do """