@@ -1688,9 +1688,15 @@ def _entity_path(self, state):
16881688
16891689class Stanza (Entity ):
16901690 """This class contains a single configuration stanza."""
1691+
16911692 def submit (self , stanza ):
16921693 """Sets the keys in *stanza* this Stanza.
16931694
1695+ *stanza* will usually be a dictionary of key/value pairs, but can also
1696+ by a raw string to send as the POST body of the request (e.g.,
1697+ `"key=some+value&other+key=another+value"`). Sending raw strings should
1698+ be considered deprecated.
1699+
16941700 :param stanza: A dictionary of key/value pairs to set in this stanza.
16951701 :type stanza: ``dict``
16961702 :return: The :class:`Stanza` object this method is called on.
@@ -2472,7 +2478,7 @@ def oneshot(self, path, **kwargs):
24722478 self .post ('oneshot' , name = path , ** kwargs )
24732479 except HTTPError as he :
24742480 if he .status == 400 :
2475- raise OperationFailedException (he . message )
2481+ raise OperationFailedException (str ( he ) )
24762482 else :
24772483 raise
24782484
@@ -2848,7 +2854,7 @@ def create(self, query, **kwargs):
28482854 response = self .post (search = query , ** kwargs )
28492855 except HTTPError as he :
28502856 if he .status == 400 : # Bad request. Raise a TypeError with the reason.
2851- raise TypeError (he . message )
2857+ raise TypeError (str ( he ) )
28522858 sid = _load_sid (response )
28532859 return Job (self .service , sid )
28542860
0 commit comments