X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetBootMedium.py;fp=PLC%2FMethods%2FGetBootMedium.py;h=7225b126c1ca38100b1f9ff64acce80315d65712;hb=3cdf2e7bfccc337c7d5cdf13c43224973ddbc795;hp=f050840c3163fb7354cd931fad7dc66fd573cead;hpb=5f76bcaf939ce721752f741ee0f25b280c7a7794;p=plcapi.git 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"%\