Skip to content

Commit 4029b3e

Browse files
Do not use short flags for dangerous instructions
1 parent d51bac4 commit 4029b3e

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

cmscontrib/AddParticipation.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
# Contest Management System - http://cms-dev.github.io/
5-
# Copyright © 2016 Stefano Maggiolo <s.maggiolo@gmail.com>
5+
# Copyright © 2017 Stefano Maggiolo <s.maggiolo@gmail.com>
66
# Copyright © 2016 Myungwoo Chun <mc.tamaki@gmail.com>
77
#
88
# This program is free software: you can redistribute it and/or modify
@@ -52,6 +52,11 @@ def add_participation(username, contest_id, ip, delay_time, extra_time,
5252
delay_time = delay_time if delay_time is not None else 0
5353
extra_time = extra_time if extra_time is not None else 0
5454

55+
if hidden:
56+
logger.warning("The participation will be hidden")
57+
if unrestricted:
58+
logger.warning("The participation will be unrestricted")
59+
5560
try:
5661
with SessionGen() as session:
5762
user = \
@@ -111,9 +116,9 @@ def main():
111116
help="how much additional time, in seconds")
112117
parser.add_argument("-t", "--team", action="store", type=utf8_decoder,
113118
help="code of the team for this participation")
114-
parser.add_argument("-n", "--hidden", action="store_true",
119+
parser.add_argument("--hidden", action="store_true",
115120
help="if the participation is hidden")
116-
parser.add_argument("-u", "--unrestricted", action="store_true",
121+
parser.add_argument("--unrestricted", action="store_true",
117122
help="if the participation is unrestricted")
118123

119124
args = parser.parse_args()

0 commit comments

Comments
 (0)