| Index: client/isolated_format.py
|
| diff --git a/client/isolated_format.py b/client/isolated_format.py
|
| index a71dbc07a839e76152db65ce5297ca302f8ede62..c828f74ada436ea1ef0e70c49b8c3f53bd45f213 100644
|
| --- a/client/isolated_format.py
|
| +++ b/client/isolated_format.py
|
| @@ -18,7 +18,7 @@ from utils import tools
|
|
|
|
|
| # Version stored and expected in .isolated files.
|
| -ISOLATED_FILE_VERSION = '1.4'
|
| +ISOLATED_FILE_VERSION = '1.5'
|
|
|
|
|
| # Chunk size to use when doing disk I/O.
|
| @@ -37,6 +37,8 @@ SUPPORTED_ALGOS = {
|
| # Used for serialization.
|
| SUPPORTED_ALGOS_REVERSE = dict((v, k) for k, v in SUPPORTED_ALGOS.iteritems())
|
|
|
| +SUPPORTED_FILE_TYPES = ['basic', 'ar']
|
| +
|
|
|
| class IsolatedError(ValueError):
|
| """Generic failure to load a .isolated file."""
|
| @@ -506,6 +508,10 @@ def load_isolated(content, algo):
|
| elif subsubkey == 's':
|
| if not isinstance(subsubvalue, (int, long)):
|
| raise IsolatedError('Expected int or long, got %r' % subsubvalue)
|
| + elif subsubkey == 't':
|
| + if subsubvalue not in SUPPORTED_FILE_TYPES:
|
| + raise IsolatedError('Expected one of \'%s\', got %r' % (
|
| + ', '.join(sorted(SUPPORTED_FILE_TYPES)), subsubvalue))
|
| else:
|
| raise IsolatedError('Unknown subsubkey %s' % subsubkey)
|
| if bool('h' in subvalue) == bool('l' in subvalue):
|
|
|