12392.7.21
by Julian Edwards
move code out of the tac file and into twistedftp.py |
1 |
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
|
8687.15.19
by Karl Fogel
Add the copyright header block to __init__.py files under lib/canonical/ |
2 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
3 |
||
1102
by Canonical.com Patch Queue Manager
Lucille had some XXXs which should have been NOTEs |
4 |
# Make this directory into a Python package.
|
12392.7.21
by Julian Edwards
move code out of the tac file and into twistedftp.py |
5 |
|
6 |
import os |
|
7 |
||
8 |
from canonical.config import config |
|
9 |
||
12392.7.31
by Julian Edwards
fix some lint |
10 |
|
12392.7.21
by Julian Edwards
move code out of the tac file and into twistedftp.py |
11 |
def get_poppy_root(): |
12 |
"""Return the poppy root to use for this server.
|
|
13 |
||
14 |
If the POPPY_ROOT environment variable is set, use that. If not, use
|
|
15 |
config.poppy.fsroot.
|
|
16 |
"""
|
|
17 |
poppy_root = os.environ.get('POPPY_ROOT', None) |
|
18 |
if poppy_root: |
|
19 |
return poppy_root |
|
20 |
return config.poppy.fsroot |