diff --git a/client/lib/engine/bin/ImageLib.py b/client/lib/engine/bin/ImageLib.py index f4ef326..f9d6357 100644 --- a/client/lib/engine/bin/ImageLib.py +++ b/client/lib/engine/bin/ImageLib.py @@ -236,24 +236,20 @@ def ogGetImageInfo (imgfile): if 'size' in partclone_info: tools = 'PARTCLONE' - sizefactor = 1000000 if 'GB' in partclone_info else 1024 m = re.search (r'File system *: *(\S+)', partclone_info) fs = m.group(1) if m else '' - if fs in ['HFS', 'HFSPLUS', 'FAT32']: - ## TODO - #FSPLUS=$(echo $PARTCLONEINFO | awk '{gsub(/\: /,"\n"); print toupper($9);}') - fsplus = 'PLUS' - if fsplus: - fs += fsplus ## 'HFS' -> 'HFSPLUS' - size = 42 - else: - size = 42 - ## /TODO - size = int (size * sizefactor) - else: - m = re.search (r'Device size *: *(\S+)', partclone_info) - size = float (m.group(1)) if m else 0 - size = int (size * sizefactor) + + sizefactor = 1000000 if 'GB' in partclone_info else 1024 + m = re.search (r'Device size *: *(\S+)', partclone_info) + size = float (m.group(1)) if m else 0 + size = int (size * sizefactor) + + ## why is this? + #if fs in ['HFS', 'HFSPLUS', 'FAT32']: + # #FSPLUS=$(echo $PARTCLONEINFO | awk '{gsub(/\: /,"\n"); print toupper($9);}') + # fsplus = 'PLUS' + # if fsplus: # fs += fsplus ## 'HFS' -> 'HFSPLUS' + imgdetect = True if False == imgdetect and not os.path.exists ('/dev/loop2'):