We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9cd272 commit ca95f77Copy full SHA for ca95f77
1 file changed
scripts/cmsDropDB
@@ -53,11 +53,17 @@ def main():
53
test_db_connection()
54
55
parser = argparse.ArgumentParser(description=__doc__)
56
+ parser.add_argument("-y", "--yes", action="store_true",
57
+ help="do not require confirmation")
58
args = parser.parse_args()
59
- print("Are you sure you want to DROP the database? [y/N] ", end='')
- ans = sys.stdin.readline().strip().lower()
60
- if ans in ["y", "yes"]:
+ if not args.yes:
61
+ print("Are you sure you want to DROP the database? [y/N] ", end='')
62
+ ans = sys.stdin.readline().strip().lower()
63
+ if ans in ["y", "yes"]:
64
+ args.yes = True
65
+
66
+ if args.yes:
67
print("Dropping database.")
68
return drop_db()
69
else:
0 commit comments