-# -*- coding: utf-8 -*-
"""Data interface functions for the mudpy engine."""
-# Copyright (c) 2004-2014 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-2015 Jeremy Stanley <fungi@yuggoth.org>. Permission
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
backups.reverse()
for old_backup in backups:
if old_backup >= max_count - 1:
- os.remove(self.filename + "." + old_backup)
+ os.remove(self.filename + "." + str(old_backup))
elif not os.path.exists(
- self.filename + "." + old_backup + 1
+ self.filename + "." + str(old_backup + 1)
):
os.rename(
- self.filename + "." + old_backup,
- self.filename + "." + old_backup + 1
+ self.filename + "." + str(old_backup),
+ self.filename + "." + str(old_backup + 1)
)
if not os.path.exists(self.filename + ".0"):
os.rename(self.filename, self.filename + ".0")