Skip to content

Commit c1713d2

Browse files
committed
Limit Python 2.6 commands.
1 parent cbc2806 commit c1713d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

planemo/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
from .config import read_global_config # noqa, ditto
1515
from planemo import __version__ # noqa, ditto
1616

17+
PYTHON_2_7_COMMANDS = ["cwl_run", "cwl_script"]
18+
IS_PYTHON_2_7 = sys.version_info[0] == 2 and sys.version_info[1] >= 7
19+
1720

1821
CONTEXT_SETTINGS = dict(auto_envvar_prefix='PLANEMO')
1922
COMMAND_ALIASES = {
@@ -78,6 +81,9 @@ def list_cmds():
7881
filename.startswith('cmd_'):
7982
rv.append(filename[len("cmd_"):-len(".py")])
8083
rv.sort()
84+
if not IS_PYTHON_2_7:
85+
for command in PYTHON_2_7_COMMANDS:
86+
rv.remove(command)
8187
return rv
8288

8389

0 commit comments

Comments
 (0)