View source on GitHub |
Ensure s contains only ASCII-safe characters; return it as bytes-type.
google.appengine.api.appinfo.EnsureAsciiString(
s, err
)
Arguments | |
---|---|
s
|
the string or bytes to check. |
err
|
the error to raise if not good. |
Raises | |
---|---|
err if it's not ASCII-safe. |
Returns | |
---|---|
s as a string. In python2, string as byte. In python3m string as unicode. |