Skip to content

Instantly share code, notes, and snippets.

@ynevet
Last active March 1, 2022 17:06
Show Gist options
  • Save ynevet/c93833cbe196f7b35e2d8ceae989d0cc to your computer and use it in GitHub Desktop.
Save ynevet/c93833cbe196f7b35e2d8ceae989d0cc to your computer and use it in GitHub Desktop.
silent-fail-anti-pattern
def load_config():
try:
default_url = 'localhost:8080'
url = config.get('url', default_url)
return url
except:
log.warning('failed to load config key: url')
return default_url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment