utils¶
Functions
deprecated (func) |
Decorator. |
mergedoc (function, other) |
Merge the docstring from the other function to the decorated function. |
one (elements) |
Returns True if only one element is not None, false otherwise |
parse_volume_string (volume_string) |
Parses a volume specification string SOURCE:TARGET:MODE into its components, or raises click.BadOptionUsage if not according to format. |
remove_quotes (s) |
Removes start/end quotes from a string, if needed. |
url_path_join (*pieces) |
Join components of url into a relative url path Use to prevent double slash when joining subpath. |
with_end_slash (url) |
Normalises a url to have an ending slash, and only one. |
without_end_slash (url) |
Makes sure there is no end slash at the end of a url. |
-
remoteappmanager.utils.
mergedoc
(function, other)[source]¶ Merge the docstring from the other function to the decorated function.
-
remoteappmanager.utils.
one
(elements)[source]¶ Returns True if only one element is not None, false otherwise
-
remoteappmanager.utils.
parse_volume_string
(volume_string)[source]¶ Parses a volume specification string SOURCE:TARGET:MODE into its components, or raises click.BadOptionUsage if not according to format.
-
remoteappmanager.utils.
remove_quotes
(s)[source]¶ Removes start/end quotes from a string, if needed. If s is not a string, it is returned untouched.
-
remoteappmanager.utils.
url_path_join
(*pieces)[source]¶ Join components of url into a relative url path Use to prevent double slash when joining subpath. This will leave the initial and final / in place
Assume pieces do not contain protocol (e.g. http://)