Skip to content

Commit 75f3d36

Browse files
author
Daniel Roseman
committed
Fix registration of tasks.
Importing show_commands was causing several tasks to be registered under the 'elasticsearch' command, because of the ordering of imports. Fix this by importing it directly within the help function where it is used.
1 parent 27ab502 commit 75f3d36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fabfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import time
1010

1111
from fabric import state
12-
from fabric.main import show_commands
1312
from fabric.api import (abort, env, get, hide, hosts, local, puts, run,
1413
runs_once, serial, settings, sudo, task, warn)
1514
from fabric.task_utils import crawl
@@ -249,6 +248,7 @@ def _replace_environment_hostnames(environment):
249248
@task
250249
def help(name=""):
251250
"""Show extended help for a task (e.g. 'fab help:search.reindex')"""
251+
from fabric.main import show_commands
252252
if not name:
253253
puts("\nFor more information on a task run `fab help:<task>`.\n")
254254
show_commands(None, 'short')

0 commit comments

Comments
 (0)