@@ -3107,6 +3107,9 @@ def _add_hard_link_to_inode(self, data_ino, length, file_mode,
31073107 # we know for certain that this is Joliet.
31083108 if self .joliet_vd is None :
31093109 raise pycdlibexception .PyCdlibInternalError ('Tried to link to Joliet record on non-Joliet ISO' )
3110+ if joliet_new_path is None :
3111+ # This can really never happen, but here to make mypy happy
3112+ raise pycdlibexception .PyCdlibInternalError ('Invalid joliet_new_path' )
31103113 # ... to a file on the Joliet filesystem.
31113114 (new_name , new_parent ) = self ._joliet_name_and_parent_from_path (joliet_new_path )
31123115 vd = self .joliet_vd
@@ -4504,6 +4507,9 @@ def modify_file_in_place(self, fp, length, iso_path, rr_name=None, # pylint: di
45044507 abs_offset = abs_extent_loc * self .logical_block_size + offset
45054508 elif isinstance (record , udfmod .UDFFileEntry ):
45064509 abs_offset = record .extent_location () * self .logical_block_size
4510+ else :
4511+ # This should never happen
4512+ raise pycdlibexception .PyCdlibInternalError ('Invalid record type' )
45074513
45084514 record .set_data_length (length )
45094515 self ._cdfp .seek (abs_offset )
@@ -5743,6 +5749,8 @@ def set_hidden(self, iso_path=None, rr_path=None, joliet_path=None):
57435749 elif joliet_path is not None :
57445750 joliet_path_bytes = self ._normalize_joliet_path (joliet_path )
57455751 rec = self ._find_joliet_record (joliet_path_bytes )
5752+ else :
5753+ raise pycdlibexception .PyCdlibInvalidInput ('Must provide exactly one of iso_path, rr_path, or joliet_path' )
57465754
57475755 rec .change_existence (True )
57485756
@@ -5773,6 +5781,8 @@ def clear_hidden(self, iso_path=None, rr_path=None, joliet_path=None):
57735781 elif joliet_path is not None :
57745782 joliet_path_bytes = self ._normalize_joliet_path (joliet_path )
57755783 rec = self ._find_joliet_record (joliet_path_bytes )
5784+ else :
5785+ raise pycdlibexception .PyCdlibInvalidInput ('Must provide exactly one of iso_path, rr_path, or joliet_path' )
57765786
57775787 rec .change_existence (False )
57785788
0 commit comments