check if maxslices arg is pased to enableSliceCreation
authorMarc Fiuczynski <mef@cs.princeton.edu>
Thu, 1 Feb 2007 14:20:19 +0000 (14:20 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Thu, 1 Feb 2007 14:20:19 +0000 (14:20 +0000)
plc.py

diff --git a/plc.py b/plc.py
index 05ed20c..e78892e 100644 (file)
--- a/plc.py
+++ b/plc.py
@@ -5,7 +5,7 @@
 # Faiyaz Ahmed <faiyaza@cs.princeton.edu>
 # Copyright (C) 2006, 2007 The Trustees of Princeton University
 #
-# $Id: plc.py,v 1.1 2006/11/14 19:27:09 faiyaza Exp $
+# $Id: plc.py,v 1.2 2007/01/24 19:29:44 mef Exp $
 #
 
 from emailTxt import *
@@ -224,6 +224,10 @@ def enableSliceCreation(argv):
                printUsage("requires admin privs")
                sys.exit(1)
 
+       if len(argv) <= 2:
+               printUsage("requires maxslice arg")
+               sys.exit(1)
+
        maxslices = int(argv[1])
        name = argv[0]
        if name.find(".") <> -1: