damogranlabs / VS-Code-STM32-IDE

Use VS Code as STM32 IDE with CubeMX
MIT License
247 stars 52 forks source link

TODO: Raise exception if `findFileInFolderTree()` fails to find 'stdint.h' #16

Closed schperplata closed 5 years ago

schperplata commented 5 years ago
 # from utilities.py
 # def getGccIncludePath()
 fileName = "stdint.h"
 filePath = findFileInFolderTree(searchPath, fileName) # returns None
 folderPath = os.path.dirname(filePath) # fails

folderPath = os.path.dirname(filePath) will fail if filePath is None. Should be printAndQuit()

Originally posted by @schperplata in https://github.com/damogranlabs/VS-Code-STM32-IDE/issues/15#issuecomment-473722150

schperplata commented 5 years ago

Fixed, check is now performed before os.path.dirname().