Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# No file entry. Could be a .sig file
continue
# make sure we're working with a number
downloads[filename] = record[0] or 0
# add a download
downloads[filename] += 1
if not downloads:
return
# Update the download counts
for filename, count in downloads.items():
cursor.execute("update release_files set downloads=%s "
"where filename=%s", (count, filename))
# Update the download timestamp
date = psycopg.TimestampFromMx(date)
cursor.execute("update timestamps set value=%s "
"where name='http'", (date,))
dbconn.commit()