More bug fixes.

This commit is contained in:
Paul S. Ferrell 2009-10-08 11:18:40 -06:00
parent 147e3835e5
commit 8235179129
2 changed files with 6 additions and 5 deletions

View File

@ -213,7 +213,7 @@ class Pflanzarr:
'background-color:%s"' % tank.color
else:
rowStyle = 'style="background-color:%s"' % tank.color
if name:
if tank.name:
name = xml.sax.saxutils.escape(tank.name)
else:
name = '#default'
@ -250,9 +250,9 @@ class Pflanzarr:
clearFrames = ['rm', '-rf', '%s' % self._imageDir]
print 'Making Movie'
subprocess.call(movieCmd)
# subprocess.call(movieCmd, stderr=open('/dev/null', 'w'),
# stdout=open('/dev/null', 'w'))
# subprocess.call(movieCmd)
subprocess.call(movieCmd, stderr=open('/dev/null', 'w'),
stdout=open('/dev/null', 'w'))
subprocess.call(clearFrames)
def _outputErrors(self, tank):

View File

@ -3,6 +3,7 @@
import asynchat
import asyncore
import optparse
import os
import shutil
import socket
import time
@ -59,7 +60,7 @@ def run_tanks(args, turns):
highest = gameNums[0]
for num in gameNums:
if highest - MAX_HIST > num and not (num % HIST_STEP == 0):
shutil.rmtree(os.path.join(path, num))
shutil.rmtree(os.path.join(path, str(num)))
try:
winner = open('/var/lib/tanks/winner').read().strip()