So I have a submodule called "web" and it has an "__init__.py", as well as
two modules:

fabfile/
  __init__.py
  web/
    __init__.py
    admin.py
    webapp.py

In web/__init__.py, I have defined a function called
"install_latest_webapp()" that should run on a remote machine. Within
admin.py and webapp.py, I defined tasks to install the latest "development"
version of a webapp. The scripts look something like:

--admin.py---
from fabric.api import *

@task
def deploy_dev():
    install_latest_webapp("admin", "development")
---end---

That worked great. But then I wanted to define a separate task in
web/__init__.py that calls install_latest_webapp() in both admin.py and
webapp.py:

---web/__init__.py---
from fabric.api import *
import admin
import webapp
@task
def deploy_dev():
  admin.install_latest_webapp()
  webapp.install_latest_webapp()
---end---

That doesn't work:

AttributeError: 'module' object has no attribute 'install_latest_webapp'

What's the best way to accomplish this?

-Sean
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to