Browse Source

[FIX] autoremove method

[FIX] Contributors
pull/620/head
archetipo 9 years ago
committed by Dave Lasley
parent
commit
13ea28d02c
  1. 2
      auto_backup/README.rst
  2. 2
      auto_backup/model/backup_scheduler.py

2
auto_backup/README.rst

@ -80,7 +80,7 @@ Credits
Contributors Contributors
------------ ------------
* Yenthe Van Ginneken <email.address@example.org>
* Yenthe Van Ginneken <yenthe.vanginneken@vanroey.be>
* Alessio Gerace <alessio.gerace@agilebg.com> * Alessio Gerace <alessio.gerace@agilebg.com>
Maintainer Maintainer

2
auto_backup/model/backup_scheduler.py

@ -375,8 +375,8 @@ class db_backup(models.Model):
dir = rec.bkp_dir dir = rec.bkp_dir
# Loop over all files in the directory. # Loop over all files in the directory.
for f in os.listdir(dir): for f in os.listdir(dir):
fullpath = os.path.join(dir, f)
if os.path.isfile(fullpath) and ".dump.zip" in f: if os.path.isfile(fullpath) and ".dump.zip" in f:
fullpath = os.path.join(dir, f)
timestamp = os.stat(fullpath).st_ctime timestamp = os.stat(fullpath).st_ctime
createtime = ( createtime = (
datetime.datetime.fromtimestamp(timestamp) datetime.datetime.fromtimestamp(timestamp)

Loading…
Cancel
Save