Changeset 16:a80165768cd1 in stamper


Ignore:
Timestamp:
Jul 19, 2014, 9:49:54 AM (6 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Keep on converting stamps in case a line in the workstamps.txt file
has no description/action set, for example:

2012-07-16 10:17 customer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/stamp2json

    r11 r16  
    4646
    4747            else:
    48                 customer = info.split(' ', 1)[0]
    49                 action = info.split(' ', 1)[1].lstrip('- ')
     48                info_items = info.split(' ', 1)
     49                customer = info_items[0]
     50                action = ''
     51                if len(info_items) > 1:
     52                    action = info_items[1].lstrip('- ')
    5053                end_time = time
    5154
Note: See TracChangeset for help on using the changeset viewer.