X-Git-Url: https://git.sthu.org/?p=sitarba.git;a=blobdiff_plain;f=sitarba;h=6f7cf5b69242c641ef61ab22c3d63e2cbe480b34;hp=ecf6f5f0b83adffe607c64a875d850b6ded5bc6d;hb=HEAD;hpb=8b1a31f919341c9ad7a75c0af9c62aed9cc9c21d diff --git a/sitarba b/sitarba index ecf6f5f..6f7cf5b 100755 --- a/sitarba +++ b/sitarba @@ -513,7 +513,7 @@ class BackupManager: # Create new backup directory basedir = self.conf.backupdir dirname = Backup.getDirName(now, epoch, mode) - tmpdirname = dirname + ("-%x" % (random.random()*2e16) ) + tmpdirname = dirname + ("-%x" % int(random.random()*2e16) ) targetdir = os.path.join(basedir, tmpdirname) os.mkdir(targetdir) @@ -532,6 +532,7 @@ class BackupManager: self.backupFileSet(s, targetdir, excludes, since) logfile.info("Stopped: " + datetime.datetime.now().ctime()) + fil.close() # Rename backup directory to final name os.rename( targetdir, os.path.join(basedir, dirname) )