When I call the following method, two returns are executed and I can't figure out why.
def Build(self, name = None):
if self.buildData:
try:
installData = self.buildData.Build(name)
return BuildResult(True, installData)
except:
pass
else:
Log("Application has no <build> data")
return BuildResult(False, None)
What happens is this:
- The method is called with a valid string, say "abc"
- self.buildData.Build(name) is called and BuildResult(True, installData) constructor is run
- The last return-statement is also executed
self.buildData? Are you sure it isn't a reference back to the parent class?