From: Oleg Broytman Date: Sun, 13 Aug 2023 14:27:22 +0000 (+0300) Subject: Feat(torrent): Improve error messages X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=438e4df55bc9c3a66c893188df0aae4ca6447713;p=extfs.d.git Feat(torrent): Improve error messages --- diff --git a/torrent b/torrent index 0e396ee..7caff9b 100755 --- a/torrent +++ b/torrent @@ -218,15 +218,13 @@ def mctorrent_copyout(): break if torrent_filename in ('.META/private', '.META/piece length'): - if 'info' not in torrent: - torrent_error('Info absent') info = torrent['info'] if torrent_filename == '.META/private': if 'private' not in info: - torrent_error('Info absent') + torrent_error('Private absent') if torrent_filename == '.META/piece length': if 'piece length' not in info: - torrent_error('Info absent') + torrent_error('Piece length absent') data = str(info[torrent_filename[len('.META/'):]]) if not torrent_filename.startswith('.META/'): @@ -242,7 +240,8 @@ def mctorrent_copyout(): def mctorrent_copyin(): """Put a file to the VFS""" - sys.exit("Torrent VFS doesn't support adding files (read-only filesystem)") + sys.exit("Torrent VFS doesn't support adding/overwriting files " + "(read-only filesystem)") def mctorrent_rm():