for reading, there is no max_volume_size but a new_volume_handler given
if comptype == 'gz' or comptype == 'bz2':
kwargs['compresslevel'] = compresslevel
- if 'max_volume_size' in kwargs:
- if comptype != 'tar' and filemode in 'wa' \
- and kwargs['max_volume_size']:
+ if 'max_volume_size' in kwargs or 'new_volume_handler' in kwargs:
+ if comptype != 'tar' and (kwargs['new_volume_handler'] or
+ kwargs['max_volume_size']):
import warnings
warnings.warn('Only the first volume will be compressed '
'for modes with "w:"!')