def download():
upgrade = True
if upgrade:
# do a download using tftp
else:
# do a download via HTTP
As you can see, I have a hard coded value of upgrade that is set to true. In this script, it always does a tftp download.
How do I change the script to do tftp download at the first iteration and in the next iteration when the function download is called, it does a http download?