PEP8-ization of db.py
Don't use method PhotoCmd._write() which doesn’t exist.