File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python2
2+ # -*- coding: utf-8 -*-
3+
4+ # Contest Management System - http://cms-dev.github.io/
5+ # Copyright © 2015 Stefano Maggiolo <s.maggiolo@gmail.com>
6+ #
7+ # This program is free software: you can redistribute it and/or modify
8+ # it under the terms of the GNU Affero General Public License as
9+ # published by the Free Software Foundation, either version 3 of the
10+ # License, or (at your option) any later version.
11+ #
12+ # This program is distributed in the hope that it will be useful,
13+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ # GNU Affero General Public License for more details.
16+ #
17+ # You should have received a copy of the GNU Affero General Public License
18+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
20+ """A class to update a dump created by CMS.
21+
22+ Used by ContestImporter and DumpUpdater.
23+
24+ This updater is no-op as the new field (score mode) has a proper
25+ default value.
26+
27+ """
28+
29+ from __future__ import absolute_import
30+ from __future__ import unicode_literals
31+ from __future__ import print_function
32+
33+
34+ class Updater (object ):
35+
36+ def __init__ (self , data ):
37+ assert data ["_version" ] == 13
38+ self .objs = data
39+
40+ def run (self ):
41+ return self .objs
You can’t perform that action at this time.
0 commit comments