Jul-08-2019, 09:50 PM
If finalPath is None, it is not reaching the return statement on line 72. I don't see another return statement, and the default return value is None.
Please don't use global variables, it's a real bad habit to get into. If you want to get tempAllPaths out of the function, return that instead of 1. It seems like you are returning 1 to indicate success. I would return tempAllPaths on success, and return an empty list for failure. The empty list can then be tested in a conditional, where it will resolve to False.
Please don't use global variables, it's a real bad habit to get into. If you want to get tempAllPaths out of the function, return that instead of 1. It seems like you are returning 1 to indicate success. I would return tempAllPaths on success, and return an empty list for failure. The empty list can then be tested in a conditional, where it will resolve to False.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures