update_34.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env python3
  2. # Contest Management System - http://cms-dev.github.io/
  3. # Copyright © 2018 Fabian Gundlach <320pointsguy@gmail.com>
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU Affero General Public License as
  6. # published by the Free Software Foundation, either version 3 of the
  7. # License, or (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU Affero General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU Affero General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. """A class to update a dump created by CMS.
  17. Used by DumpImporter and DumpUpdater.
  18. This updater is no-op as we only changed some fields from Integer to
  19. BigInteger.
  20. """
  21. class Updater:
  22. def __init__(self, data):
  23. assert data["_version"] == 33
  24. self.objs = data
  25. def run(self):
  26. return self.objs