Argument length checking for the upload script

This commit is contained in:
APerson 2014-07-24 19:21:04 -04:00
parent 73d3dc0fa6
commit 8710c6353a

View File

@ -28,6 +28,12 @@ import git
import mwclient import mwclient
import subprocess import subprocess
# Check number of arguments
if len(sys.argv) != 4:
print "Incorrect number of arguments supplied."
print "Usage: upload.py [site] [root] [username] [password]"
sys.exit(1)
# Shortname of the wiki target # Shortname of the wiki target
wiki = sys.argv[1] wiki = sys.argv[1]