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

View File

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