keystone/bin/keystone-manage
Yuriy Taraday 8f32ce329b Made all sample data loading in one script.
Both keystone-manage and sampledata.sh logic moved to keystone package, kept
simple starter scripts in bin/ dir.
New sampledata module can theoretically be suitable for loading different
fixtures in one Python interpreter.
Snuck in a couple of extensions changes while fixing PEP8

Change-Id: Ie05a9afb528d41b93e56f41d252363b6de2d600d
2011-08-17 09:53:07 -05:00

17 lines
568 B
Python
Executable File

#!/usr/bin/env python
import os
import sys
# If ../../keystone/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
if os.path.exists(os.path.join(possible_topdir, 'keystone', '__init__.py')):
sys.path.insert(0, possible_topdir)
import keystone.manage
if __name__ == '__main__':
keystone.manage.main()