The code shows a number of best practices:
- don't store passwords/keys, pass them in via environment variables
- make an iterator of files, add to it using chain()
- Python3 subprocess.check_output() is a little odd
- logging, like voting, should be done early and often
- code ensures FTP connection always closed cleanly
https://github.com/shavenwarthog/johntellsall/blob/master/class/django-queryset/ftpsync.py
No comments:
Post a Comment