

def _ParseVSSStoresString(self, vss_stores):
    'Parses the user specified VSS stores string.\n\n    A range of stores can be defined as: 3..5. Multiple stores can\n    be defined as: 1,3,5 (a list of comma separated values). Ranges\n    and lists can also be combined as: 1,3..5. The first store is 1.\n    All stores can be defined as "all".\n\n    Args:\n      vss_stores: a string containing the VSS stores.\n\n    Returns:\n      A list containing the individual VSS stores numbers or the string "all".\n\n    Raises:\n      ValueError: if the VSS stores option is invalid.\n    '
    if (not vss_stores):
        return []
    if (vss_stores == 'all'):
        return ['all']
    stores = []
    for vss_store_range in vss_stores.split(','):
        if ('..' in vss_store_range):
            (first_store, last_store) = vss_store_range.split('..')
            try:
                first_store = int(first_store, 10)
                last_store = int(last_store, 10)
            except ValueError:
                raise ValueError('Invalid VSS store range: {0:s}.'.format(vss_store_range))
            for store_number in range(first_store, (last_store + 1)):
                if (store_number not in stores):
                    stores.append(last_store)
        else:
            if vss_store_range.startswith('vss'):
                vss_store_range = vss_store_range[3:]
            try:
                store_number = int(vss_store_range, 10)
            except ValueError:
                raise ValueError('Invalid VSS store range: {0:s}.'.format(vss_store_range))
            if (store_number not in stores):
                stores.append(store_number)
    return sorted(stores)

dataset/ETHPy150Open log2timeline/dfvfs/examples/recursive_hasher.py RecursiveHasherVolumeScannerMediator._ParseVSSStoresString/VarMisuse@151/467 `store_number`->`last_store`