I haven't checked the new version you published, but the previous one requires a small change as of macOS Sierra.
diskutil info no longer refers to the size using the word 'size', but using the word 'space'.
Therefore, the line "volume_size = re.search('Total Size:\s+(\S+\s\w+)', extra_info)" needs to be changed to "volume_size = re.search('Total Space:\s+(\S+\s\w+)', extra_info)"
Eject Specific Drives/Volumes/Mounts
in Share your Workflows
Posted
I haven't checked the new version you published, but the previous one requires a small change as of macOS Sierra.
diskutil info no longer refers to the size using the word 'size', but using the word 'space'.
Therefore, the line "volume_size = re.search('Total Size:\s+(\S+\s\w+)', extra_info)" needs to be changed to "volume_size = re.search('Total Space:\s+(\S+\s\w+)', extra_info)"