Argument length checking for the upload script
This commit is contained in:
parent
73d3dc0fa6
commit
8710c6353a
@ -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]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user