From: Thierry Parmentelat Date: Fri, 11 Feb 2011 15:51:31 +0000 (+0100) Subject: whoops, stupid me X-Git-Tag: plcapi-5.0-29~2 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=3cdf2e7bfccc337c7d5cdf13c43224973ddbc795 whoops, stupid me --- diff --git a/PLC/Methods/GetBootMedium.py b/PLC/Methods/GetBootMedium.py index f050840..7225b12 100644 --- a/PLC/Methods/GetBootMedium.py +++ b/PLC/Methods/GetBootMedium.py @@ -317,7 +317,7 @@ class GetBootMedium(Method): # and this leads to the old file sitting in there forever # so, if the file is older than 5 minutes, we just trash grace=5 - if os.path.exists(filename) and os.path.getmtime(filename)-time.time() >= (grace*60): + if os.path.exists(filename) and (time.time()-os.path.getmtime(filename)) >= (grace*60): os.unlink(filename) if os.path.exists(filename): raise PLCInvalidArgument, "Resulting file %s already exists - please try again in %d minutes"%\