> + if branch == "": > + print("ERROR: No branch defined") > + return 1 > This is a good way to make sure that nobody ever reads this message. How about an exception instead?