Merge pull request #193 from brutasse/feature/sentry-dsn-env

Ability to get SENTRY_DSN from the environment variables
main
Vincent Driessen 12 years ago
commit d15fee2cfb

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
import os
import sys import sys
import argparse import argparse
import logging import logging
@ -45,7 +46,8 @@ def main():
# Other default arguments # Other default arguments
if args.sentry_dsn is None: if args.sentry_dsn is None:
args.sentry_dsn = settings.get('SENTRY_DSN', None) args.sentry_dsn = settings.get('SENTRY_DSN',
os.environ.get('SENTRY_DSN', None))
if args.verbose and args.quiet: if args.verbose and args.quiet:
raise RuntimeError("Flags --verbose and --quiet are mutually exclusive.") raise RuntimeError("Flags --verbose and --quiet are mutually exclusive.")

Loading…
Cancel
Save