From 82351791296f7eb90730e831f79cf2b47f851b06 Mon Sep 17 00:00:00 2001 From: "Paul S. Ferrell" Date: Thu, 8 Oct 2009 11:18:40 -0600 Subject: [PATCH] More bug fixes. --- tanks/lib/Pflanzarr.py | 8 ++++---- tanks/run_tanks.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tanks/lib/Pflanzarr.py b/tanks/lib/Pflanzarr.py index 8b19777..ac600a2 100644 --- a/tanks/lib/Pflanzarr.py +++ b/tanks/lib/Pflanzarr.py @@ -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): diff --git a/tanks/run_tanks.py b/tanks/run_tanks.py index f8950d1..ba52a28 100755 --- a/tanks/run_tanks.py +++ b/tanks/run_tanks.py @@ -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()