Skip to content

Commit 545a83d

Browse files
committed
removed os.path.join from fabfile
allows the usage of the django-project-template in a windows environment
1 parent 727169f commit 545a83d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

fabfile.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
env.user = APP_USER
1717
env.use_shell = False
1818

19-
PROJECT_PATH = os.path.join(os.path.dirname(__file__))
19+
PROJECT_PATH = os.path.dirname(__file__)
2020
REPO_PATH = '/home/{}/{}'.format(APP_USER, APP_NAME)
2121
SOURCE_VENV = 'source /usr/local/bin/virtualenvwrapper.sh'
2222
WORKON_ENV = '{} && workon {}'.format(SOURCE_VENV, VENV_NAME)
@@ -140,8 +140,8 @@ def bootstrap():
140140
))
141141
sudo('chown -fR {0}:{0} {1}'.format(APP_USER, ssh_dir))
142142

143-
sudoers_file = os.path.join('/etc/sudoers.d/', APP_USER)
144-
tmp_file = os.path.join('/tmp', APP_USER)
143+
sudoers_file = '/etc/sudoers.d/{}'.format(APP_USER)
144+
tmp_file = '/tmp/{}'.format(APP_USER)
145145
if not exists(sudoers_file):
146146
sudo('echo "{} ALL=NOPASSWD: ALL" > {}'.format(APP_USER, tmp_file))
147147
sudo('chown root:root {}'.format(tmp_file))
@@ -157,8 +157,8 @@ def provision(branch='master'):
157157

158158
update_code(branch)
159159

160-
puppet_path = os.path.join(REPO_PATH, 'puppet/')
161-
modules_path = os.path.join(puppet_path, 'modules')
160+
puppet_path = '{}/puppet/'.format(REPO_PATH)
161+
modules_path = '{}/modules'.format(puppet_path)
162162
puppet_modules = '{}:/etc/puppet/modules'.format(modules_path)
163163

164164
if not exists('/usr/bin/puppet'):
@@ -169,7 +169,7 @@ def provision(branch='master'):
169169
run('sudo python bootstrap.py')
170170

171171
if env.is_vagrant:
172-
cmd = os.path.join(puppet_path, 'manifests', 'site.pp')
172+
cmd = '{}/manifests/site.pp'.format(puppet_path)
173173
else:
174174
cmd = '-e "include {}"'.format(APP_NAME)
175175

0 commit comments

Comments
 (0)