Skip to content

Commit

Permalink
Missed a couple spaces in my call() routines, broke my script.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdeboard committed May 8, 2011
1 parent 400880e commit 0810b88
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions srchupdate.py
Expand Up @@ -14,17 +14,18 @@ def update():
datefmt='%m/%d/%Y %H:%M:%S')
logging.info('Starting index update.')
try:
mattwhoosh = subprocess.call(['sudo', 'chown', 'matt:matt '+whoosh_dir])
mattwhooshfiles = subprocess.call(['sudo', 'chown',
mattwhoosh = subprocess.call(['sudo', 'chown', '-R',
'matt:matt '+whoosh_dir])
mattwhooshfiles = subprocess.call(['sudo', 'chown', '-R',
'matt:matt '+whoosh_dir+'*'])
update_index = subprocess.call([domain_dir+'bin/python',
appdir+'manage.py update_index'])
apachewhsh = subprocess.call(['sudo', 'chown',
apachewhsh = subprocess.call(['sudo', 'chown', '-R',
'www-data:www-data '+whoosh_dir])
apachewhsh2 = subprocess.call(['sudo', 'chown',
apachewhsh2 = subprocess.call(['sudo', 'chown', '-R',
'www-data:www-data '+whoosh_dir+'*'])
apachereload = subprocess.call(['sudo',
'/etc/init.d/apache2 force-reload'])
'/etc/init.d/apache2', 'force-reload'])
if sum(mattwhoosh, mattwhooshfiles, update_index, apachewhsh,
apachewhsh2, apachereload) == 0:
logging.info('Index successfully updated.')
Expand Down

0 comments on commit 0810b88

Please sign in to comment.