Simple and to the point.
Just a couple of notes:
Shouldn't the netmngr --command be update?
I'd decouple both scripts and spawn them both from cronjob.
- Simpler debugging, one could run them separately and inspect intermediate data
- mentat-netmngr.py path wouldn't be hardcoded in update-casablanca.py
- One argument shell=True Popen form is generally frowned upon exactly because of the intermediate shell process
10 6 * * * mentat /etc/mentat/scripts/update-casablanca.py && /var/mentat/venv/bin/mentat-netmngr.py --regular --command update --whois-file /var/mentat/casablanca.json --source ripe
And I wouldn't even hardwire the output filename in update-casablanca.py, we can just spit it to sys.stdout and leave the rest on the shell.
(We could [ab]use cron variables to stay DRY. And maybe even to make it more readable.)
outf = /var/mentat/casablanca.json
update = /etc/mentat/scripts/update-casablanca.py
netmngr = /var/mentat/venv/bin/mentat-netmngr.py
10 6 * * * mentat "$update" > "$outf" && "$netmngr" --regular --command update --whois-file "$outf" --source ripe
Also, thinking of it, it might come handy to keep the "ok" version intact in case of an error, and maybe even leave it aside on success.
10 6 * * * "$update" > "$outf".tmp && "$netmngr" --regular --command update --whois-file "$outf".tmp --source ripe && mv -f "$outf" "$outf".backup && mv -f "$outf".tmp "$outf"
Or maybe even:
10 6 * * * "$update" | tee "$outf".$(date +"%Y-%m-%dT%H:%M:%S") | "$netmngr" --regular --command update --whois-file /dev/stdin --source ripe