fix upload.py if no links