diff options
Diffstat (limited to 'abs/core/LinHES-system/balance_storage_groups.py')
-rwxr-xr-x | abs/core/LinHES-system/balance_storage_groups.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/abs/core/LinHES-system/balance_storage_groups.py b/abs/core/LinHES-system/balance_storage_groups.py index e088cb5..27de6a9 100755 --- a/abs/core/LinHES-system/balance_storage_groups.py +++ b/abs/core/LinHES-system/balance_storage_groups.py @@ -80,12 +80,12 @@ if __name__ == '__main__': SGDIRSdata = sorted(SGDIRSdata, reverse=True, key=operator.itemgetter(1)) #print SGDIRSdata - # Check if SG has any mpg or nuv files + # Check if SG has any ts, mpg or nuv files i=0 for dir in SGDIRSdata: mostFull = SGDIRSdata[i] i=i+1 - if len(glob.glob1(mostFull[0],"*.mpg")) or len(glob.glob1(mostFull[0],"*.nuv")): + if len(glob.glob1(mostFull[0],"*.ts")) or len(glob.glob1(mostFull[0],"*.mpg")) or len(glob.glob1(mostFull[0],"*.nuv")): break else: if i == 1: @@ -106,7 +106,7 @@ if __name__ == '__main__': sys.exit() # Get random file from most used dir - fileToMove = random.choice([f for f in os.listdir(mostFull[0]) if f.endswith(".mpg") or f.endswith(".nuv")]) + fileToMove = random.choice([f for f in os.listdir(mostFull[0]) if f.endswith(".ts") or f.endswith(".mpg") or f.endswith(".nuv")]) filePathToMove = mostFull[0] + "/" + fileToMove # Check that the file isn't too big for least used dir |