Created
May 23, 2012 23:00
-
-
Save kisielk/2778374 to your computer and use it in GitHub Desktop.
Function for returning a URL to access an error sent to sentry via raven
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def error_url(dsn, error_id): | |
import urlparse | |
search_base = urlparse.urlsplit(dsn) | |
search_url = search_base._replace(netloc=search_base.netloc.split('@')[1], | |
query='q={0}'.format(error_id), | |
path=search_base.path + '/search') | |
return search_url.geturl() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment