Skip to content

Commit

Permalink
fetch spacewalk.ini from the environment if set
Browse files Browse the repository at this point in the history
  • Loading branch information
wwitzel3 authored and mattclay committed Apr 4, 2017
1 parent b7cc461 commit 1a1e12c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/inventory/spacewalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@
import simplejson as json

base_dir = os.path.dirname(os.path.realpath(__file__))
default_ini_file = os.path.join(base_dir, "spacewalk.ini")

SW_REPORT = '/usr/bin/spacewalk-report'
CACHE_DIR = os.path.join(base_dir, ".spacewalk_reports")
CACHE_AGE = 300 # 5min
INI_FILE = os.path.join(base_dir, "spacewalk.ini")
INI_FILE = os.path.expanduser(os.path.expandvars(os.environ.get("SPACEWALK_INI_PATH", default_ini_file)))


# Sanity check
if not os.path.exists(SW_REPORT):
Expand Down

0 comments on commit 1a1e12c

Please sign in to comment.