clear_contest: make python3 ready, remove unused import
This commit is contained in:
parent
9efdeda3c6
commit
92007bab02
|
@ -1,8 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
# prepare environment
|
# prepare environment
|
||||||
import sys
|
import sys
|
||||||
sys.path.append("..")
|
sys.path.append("..")
|
||||||
|
@ -11,7 +9,11 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cqtu.settings")
|
||||||
import django
|
import django
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
confirm = raw_input("Do are you sure you want to clear all contest data? Answer with uppercase YES: ")
|
confirm_msg = "Do are you sure you want to clear all contest data? Answer with uppercase YES: "
|
||||||
|
try:
|
||||||
|
confirm = raw_input(confirm_msg)
|
||||||
|
except NameError:
|
||||||
|
confirm = input(confirm_msg)
|
||||||
|
|
||||||
if confirm != "YES":
|
if confirm != "YES":
|
||||||
print("Aborting")
|
print("Aborting")
|
||||||
|
|
Loading…
Reference in New Issue