From 10e4ece01b035002cdf67efc917ed083c33a24e4 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 25 Oct 2010 11:17:04 +0200 Subject: [PATCH] southsettings: Add argv length check. Without this check, manage.py would throw an exception when called without arguments. --- southsettings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/southsettings.py b/southsettings.py index 63ff314..338c62e 100644 --- a/southsettings.py +++ b/southsettings.py @@ -2,7 +2,7 @@ # which requires more privileges. import sys -if 'manage.py' in sys.argv[0] and sys.argv[1] == 'migrate': +if len(sys.argv) >= 2 and 'manage.py' in sys.argv[0] and sys.argv[1] == 'migrate': import south try: -- 2.30.2