Closed doccaz closed 2 years ago
The problem lies with dealing with a trailing backslash (if it exists):
>>> import os
>>> blah='/home/erico/Projetos/scc-tools/tests/scc_exogelvm11219_210311_0856/'
>>> blah.split(os.sep)[-1]
''
>>> blah.rstrip(os.sep).split(os.sep)[-1]
'scc_exogelvm11219_210311_0856'
We need to rstrip () the OS path separators from the end of the string, or else the split() will return empty.
Thanks! Can confirm this is now fixed!
As reported by Ralph Roth:
The script was called with:
$ ./vercheck.py -d /home/ralph/Desktop/.../unpacked/scc_czdcpv-uxnfs204_211101_1146/