Skip to content
Browse files

fix issue where woven-admin.py gets removed from the path

  • Loading branch information...
1 parent c5e97c5 commit d461097cbc5d906aa8d82f8bba4716ef2012f90d @bretth committed Jan 17, 2011
Showing with 3 additions and 5 deletions.
  1. +3 −5 bin/woven-admin.py
View
8 bin/woven-admin.py
@@ -178,12 +178,13 @@ def start_distribution(project_name, template_dir, dist, noadmin):
sys.exit(1)
local_working_dir = os.path.split(env.setup_path)[0]
os.chdir(local_working_dir)
-
+
+ woven_admin = sys.argv[0]
setup = run_setup('setup.py',stop_after="init")
settings_mod = '.'.join([setup.packages[0],'settings'])
os.environ['DJANGO_SETTINGS_MODULE'] = settings_mod
sys.argv.remove('setup.py')
-
+ sys.argv.insert(0, woven_admin)
#be path friendly like manage.py
sys.path.append(os.getcwd())
@@ -234,8 +235,5 @@ def start_distribution(project_name, template_dir, dist, noadmin):
else:
#switch back to the original directory just in case some command needs it
os.chdir(orig_cwd)
- #inject woven-admin.py into the args
- if not 'woven-admin.py' in sys.argv[0]:
- sys.argv.insert(0,'woven-admin.py')
execute_from_command_line()

0 comments on commit d461097

Please sign in to comment.
Something went wrong with that request. Please try again.