slaclab / trace

Live and Archived data plotting tool
https://slaclab.github.io/trace/
3 stars 4 forks source link

FIX: Fixing input_file argument for trace (TRC-66) #79

Closed zdomke closed 1 week ago

zdomke commented 1 week ago

Fixing a bug caused by batch conversion feature.

PathAction was taking in a list or a string, but only treating it as a list. This resulted in it creating a Path object for every character in the provided string. My solution is to check if the given value is a string, and if it is, then PathAction wraps it in a list first.

The second issue PathAction had, is that it only ever returned a list. So FileIOMixin.save_file_import would throw an error because it expected a Path object. My solution is to unpack the list before calling save_file_import.

zdomke commented 1 week ago

Related to Jira issue: https://jira.slac.stanford.edu/secure/RapidBoard.jspa?rapidView=207&projectKey=TRC&view=detail&selectedIssue=TRC-66#