From 51e88dbaddf9048a23057fe00993083eac739cbe Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Sat, 13 Feb 2010 18:23:59 -0500 Subject: [PATCH] Don't make empty files for Stars format HH. --- pyfpdb/HandHistoryConverter.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/pyfpdb/HandHistoryConverter.py b/pyfpdb/HandHistoryConverter.py index 5fa28608..4bf7564d 100644 --- a/pyfpdb/HandHistoryConverter.py +++ b/pyfpdb/HandHistoryConverter.py @@ -92,24 +92,7 @@ follow : whether to tail -f the input""" self.out_fh = sys.stdout else: # TODO: out_path should be sanity checked. - out_dir = os.path.dirname(self.out_path) - if not os.path.isdir(out_dir) and out_dir != '': - try: - os.makedirs(out_dir) - except: # we get a WindowsError here in Windows.. pretty sure something else for Linux :D - log.error("Unable to create output directory %s for HHC!" % out_dir) - print "*** ERROR: UNABLE TO CREATE OUTPUT DIRECTORY", out_dir - # TODO: pop up a box to allow person to choose output directory? - # TODO: shouldn't that be done when we startup, actually? - else: - log.info("Created directory '%s'" % out_dir) - try: - self.out_fh = codecs.open(self.out_path, 'w', 'utf8') - except: - log.error("out_path %s couldn't be opened" % (self.out_path)) - else: - log.debug("out_path %s opened as %s" % (self.out_path, self.out_fh)) - + self.out_fh = sys.stdout self.follow = follow self.compiledPlayers = set() self.maxseats = 10