Skip to content

Commit

Permalink
easier for sed mangling
Browse files Browse the repository at this point in the history
  • Loading branch information
kif committed Jan 21, 2015
1 parent 38d3a07 commit c77fd48
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fabio-src/directories.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
import logging
logger = logging.getLogger("fabio.directories")

SHARED_TESTIMAGES = "/usr/share/fabio/testimages"

# testimage contains the directory name where
testimages = None
if "FABIO_TESTIMAGES" in os.environ:
testimages = os.environ.get("FABIO_TESTIMAGES")
if not os.path.exists(testimages):
logger.warning("testimage directory %s does not exist" % testimages)
elif os.path.isdir("/usr/share/fabio/testimages"):
testimages = "/usr/share/fabio/testimages"
elif os.path.isdir(SHARED_TESTIMAGES):
testimages = SHARED_TESTIMAGES
else:
# create a temporary folder
testimages = os.path.join(tempfile.gettempdir(), "fabio_testimages_%s" % (name, getpass.getuser()))
Expand Down

0 comments on commit c77fd48

Please sign in to comment.