Skip to content

Commit

Permalink
small fix in is_coroutine() function
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Feb 6, 2017
1 parent e511747 commit 7cb9a5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/netius/base/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def ensure_generator(value):
return False, value

def is_coroutine(callable):
if hasattr(coroutine, "_is_coroutine"): return True
if hasattr(callable, "_is_coroutine"): return True
return False

def wakeup(force = False):
Expand Down
6 changes: 1 addition & 5 deletions src/netius/base/async_neo.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,7 @@ def ensure_generator(value):
return False, value

def is_coroutine(callable):
if hasattr(coroutine, "_is_coroutine"):
return True

if hasattr(inspect, "iscoroutine") and\
inspect.iscoroutine(callable): #@UndefinedVariable
if hasattr(callable, "_is_coroutine"):
return True

if hasattr(inspect, "iscoroutinefunction") and\
Expand Down

0 comments on commit 7cb9a5d

Please sign in to comment.