saltstack/salt — pull request #8186 by terminalmage (2013-10-30 23:13:07+00:00)
Title: Fix for managing debian repos with trailing slashes in the URI

This commit modifies apt.py's expand_repo_def and list_repos (as well as
get_repo, as it uses list_repos) functions to strip the trailing slash.
This allows for repo definitions to be created with trailing slashes,
and for a trailing slash to not result in a failure to match a repo.

Additionally, this commit has fixes for generic "raise Exception" usage,
instead using salt.exceptions.CommandExecutionError as it avoids
tracebacks in the CLI output.

Finally, some manual quoting has been converted to using raw strings.

Fixes #7696.