cutright / IMRT-QA-Data-Miner

Scans a directory for IMRT QA results
MIT License
13 stars 5 forks source link

Fix keys list when last element has whitespace #10

Closed mchamberland closed 4 years ago

mchamberland commented 4 years ago

@cutright Please review and test with your reports.

On my system, the last element in the list of keys is '\r\n'.

On line 33, after stripping the whitespace, the last element is now an empty string. But if you simply add ['file_name'], this adds an extra column compared to the raw_data.

cutright commented 4 years ago

Thanks again Marc. I think because of my trending_delta4 update, it doesn't like the merge. I'll manually made these edits. Although, I think a simpler way is the following:

keys = [key.strip() for key in keys if key] + ['file_name']
cutright commented 4 years ago

Correction: keys = [key.strip() for key in keys if key.strip()] + ['file_name']