I'm working on my first python script. I want to use a variable within a callback-function:
def run(self, edit):
gitFolder = os.path.basename(gitRoot)
#Get branch
self.run_command(['git', 'rev-parse','--abbrev-ref','HEAD'], self.branchDone)
def branchDone(self, result):
build = "./Build-Release.ps1 " + gitFolder + " " + result +" -Deploy;"
print build
How do I make gitFolder available to the method branchDone?