Skip to content

Commit

Permalink
bring examples more in line with one another, fixing #1
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud committed Mar 1, 2016
1 parent f16eea5 commit 542f307
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import logging
def create_user(name):
logging.info('creating user with name %r', name)
try:
success = _create_user()
success = _create_user(name)
if success:
logging.info('successfully created user %r', name)
else:
Expand All @@ -34,10 +34,11 @@ Here's lithoxyl's take:
from lithoxyl import stderr_log

def create_user(name):
with stderr_log.critical('user creation', reraise=False) as r:
success = _create_user()
with stderr_log.critical('user creation', username=name, reraise=False) as r:
success = _create_user(name)
if not success:
r.failure()
return success
```


Expand Down

0 comments on commit 542f307

Please sign in to comment.