Commit be10ba69 authored by Nicolas Wavrant's avatar Nicolas Wavrant

improve backupFilesWereModifiedDuringExport

parent 012e76b7
...@@ -210,11 +210,11 @@ def writeSignatureFile(slappart_signature_method_dict, runner_working_path, sign ...@@ -210,11 +210,11 @@ def writeSignatureFile(slappart_signature_method_dict, runner_working_path, sign
def backupFilesWereModifiedDuringExport(export_start_date): def backupFilesWereModifiedDuringExport(export_start_date):
export_time = time.time() - export_start_date export_time = time.time() - export_start_date
process = subprocess.Popen(['find', '-cmin', str(export_time / 60.), '-type', 'f', '-path', '*/srv/backup/*'], stdout=subprocess.PIPE) return bool(
process.wait() subprocess.check_output((
if process.stdout.read(): 'find', '-cmin', str(export_time / 60.), '-type', 'f', '-path', '*/srv/backup/*'
return True ))
return False )
def runExport(): def runExport():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment