Skip to content

Commit

Permalink
cleanup: remove pre-python 2.6 code
Browse files Browse the repository at this point in the history
  • Loading branch information
little-dude committed Feb 29, 2016
1 parent 8732cdc commit 28146b4
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions nose2/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,8 @@
import sys
import traceback
import platform

try:
from inspect import isgeneratorfunction # new in 2.6
except ImportError:
import inspect
try:
from compiler.consts import CO_GENERATOR
except ImportError:
# IronPython doesn't have a complier module
CO_GENERATOR = 0x20
# backported from Python 2.6

def isgeneratorfunction(func):
return bool((inspect.isfunction(func) or inspect.ismethod(func)) and
func.func_code.co_flags & CO_GENERATOR)

import six
from inspect import isgeneratorfunction # new in 2.6


__unittest = True
Expand Down

0 comments on commit 28146b4

Please sign in to comment.