David Blume commited on 2019-03-23 14:35:53
Showing 1 changed files, with 2 additions and 8 deletions.
... | ... |
@@ -8,7 +8,6 @@ import yaml |
8 | 8 |
import sys |
9 | 9 |
import os |
10 | 10 |
import time |
11 |
-import StringIO |
|
12 | 11 |
import codecs |
13 | 12 |
import traceback |
14 | 13 |
import calendar |
... | ... |
@@ -18,7 +17,6 @@ import urllib |
18 | 17 |
import urllib2 |
19 | 18 |
import httplib |
20 | 19 |
import shutil |
21 |
-import glob |
|
22 | 20 |
import smtplib |
23 | 21 |
import analysis |
24 | 22 |
import json |
... | ... |
@@ -56,6 +54,7 @@ html_head = """<!DOCTYPE html> |
56 | 54 |
table.legend td { border: 1px solid LightSlateGray; } |
57 | 55 |
tr.even { background:#%s; padding: 2em; } |
58 | 56 |
tr.odd { background:#%s; padding-bottom: 2em; } |
57 |
+ td div { height: 68px; } |
|
59 | 58 |
</style> |
60 | 59 |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> |
61 | 60 |
<script type="text/javascript"> |
... | ... |
@@ -438,9 +437,6 @@ def make_index_html(yaml_items, weekend_stats, weekday_stats): |
438 | 437 |
cur_time = int(time.time()) |
439 | 438 |
new_index_fullpath = os.path.join(localdir, 'index.html_new') |
440 | 439 |
index_fullpath = os.path.join(localdir, 'index.html') |
441 |
- cache_path = os.path.join(localdir, 'cache') |
|
442 |
- |
|
443 |
- files_to_delete = glob.glob(os.path.join(cache_path, '*.png')) |
|
444 | 440 |
|
445 | 441 |
chart_io = cStringIO.StringIO() |
446 | 442 |
for image_index, image in enumerate(yaml_items[:40]): |
... | ... |
@@ -483,8 +479,6 @@ def make_index_html(yaml_items, weekend_stats, weekday_stats): |
483 | 479 |
if os.path.exists(index_fullpath): |
484 | 480 |
os.unlink(index_fullpath) |
485 | 481 |
shutil.move(new_index_fullpath, index_fullpath) |
486 |
- for fname in files_to_delete: |
|
487 |
- os.unlink(fname) |
|
488 | 482 |
|
489 | 483 |
|
490 | 484 |
def make_feed_file(yaml_items): |
... | ... |
@@ -512,7 +506,7 @@ if __name__=='__main__': |
512 | 506 |
|
513 | 507 |
old_stdout = sys.stdout |
514 | 508 |
old_stderr = sys.stderr |
515 |
- sys.stdout = sys.stderr = StringIO.StringIO() |
|
509 |
+ sys.stdout = sys.stderr = cStringIO.StringIO() |
|
516 | 510 |
|
517 | 511 |
try: |
518 | 512 |
localdir = os.path.abspath(os.path.dirname(sys.argv[0])) |
519 | 513 |