Index: trunk/tools/editor_trends/utils/log.py |
— | — | @@ -75,19 +75,19 @@ |
76 | 76 | coll.update({'hash': hash}, {'$set': {'tasks': tasks}}) |
77 | 77 | |
78 | 78 | |
79 | | -def log_to_csv(logger, settings, **kwargs): |
| 79 | +def log_to_csv(logger, settings, message, verb, function, **kwargs): |
80 | 80 | ''' |
81 | 81 | Writes detailed log information to logs / projectname_date.csv |
82 | 82 | ''' |
83 | | - message = kwargs.pop('message') |
84 | | - verb = kwargs.pop('verb') |
85 | | - function = kwargs.pop('function') |
86 | 83 | logger.debug('%s\tStarting %s' \ |
87 | 84 | % (datetime.datetime.now(), function.func_name)) |
88 | 85 | if message: |
89 | 86 | logger.debug('%s\t%s' % (datetime.datetime.now(), message)) |
90 | 87 | |
91 | | - max_length = max([len(prop) for prop in kwargs if type(prop) != type(True)]) |
| 88 | + try: |
| 89 | + max_length = max([len(prop) for prop in kwargs if type(prop) != type(True)]) |
| 90 | + except ValueError: |
| 91 | + max_length = 0 |
92 | 92 | max_tabs = max_length // settings.tab_width |
93 | 93 | res = max_length % settings.tab_width |
94 | 94 | if res > 0: |