UDF Example Raises PyCdlibInvalidInput Exception
utkonos opened this issue · 1 comments
utkonos commented
This is the example for creating a UDF ISO in the documentation here:
https://clalancette.github.io/pycdlib/example-creating-udf-iso.html
from io import BytesIO
import pycdlib
iso = pycdlib.PyCdlib()
iso.new(udf=True)
foostr = b'foo\n'
iso.add_fp(BytesIO(foostr), len(foostr), '/FOO.;1', udf_path='/foo')
iso.add_directory('/DIR1', udf_path='/dir1')
iso.write('new.iso')
iso.close()
It raises an exception:
---------------------------------------------------------------------------
PyCdlibInvalidInput Traceback (most recent call last)
Input In [24], in <cell line: 6>()
3 import pycdlib
5 iso = pycdlib.PyCdlib()
----> 6 iso.new(udf=True)
7 foostr = b'foo\n'
8 iso.add_fp(BytesIO(foostr), len(foostr), '/FOO.;1', udf_path='/foo')
File /Volumes/Jupyter/venv/lib/python3.10/site-packages/pycdlib/pycdlib.py:3880, in PyCdlib.new(self, interchange_level, sys_ident, vol_ident, set_size, seqnum, log_block_size, vol_set_ident, pub_ident_str, preparer_ident_str, app_ident_str, copyright_file, abstract_file, bibli_file, vol_expire_date, app_use, joliet, rock_ridge, xa, udf)
3877 raise pycdlibexception.PyCdlibInvalidInput('Rock Ridge value must be None (no Rock Ridge), 1.09, 1.10, or 1.12')
3879 if udf and udf != '2.60':
-> 3880 raise pycdlibexception.PyCdlibInvalidInput('UDF value must be empty (no UDF), or 2.60')
3882 if not app_ident_str:
3883 app_ident_str = 'PyCdlib (C) 2015-2020 Chris Lalancette'
PyCdlibInvalidInput: UDF value must be empty (no UDF), or 2.60
utkonos commented
I see that if I set udf='2.60'
it works.