mirror of
https://github.com/morgan9e/helium
synced 2026-04-15 00:44:06 +09:00
@@ -365,7 +365,7 @@ def _retrieve_callback(args):
|
||||
check_downloads(DownloadInfo(args.ini), args.cache)
|
||||
except HashMismatchError as exc:
|
||||
get_logger().error('File checksum does not match: %s', exc)
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def _unpack_callback(args):
|
||||
|
||||
@@ -10,6 +10,7 @@ import argparse
|
||||
from pathlib import Path
|
||||
|
||||
from _common import ENCODING, get_logger, add_common_params
|
||||
import sys
|
||||
|
||||
|
||||
def prune_dir(unpack_root, prune_files):
|
||||
@@ -32,7 +33,7 @@ def prune_dir(unpack_root, prune_files):
|
||||
def _callback(args):
|
||||
if not args.directory.exists():
|
||||
get_logger().error('Specified directory does not exist: %s', args.directory)
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
if not args.pruning_list.exists():
|
||||
get_logger().error('Could not find the pruning list: %s', args.pruning_list)
|
||||
prune_files = tuple(filter(len, args.pruning_list.read_text(encoding=ENCODING).splitlines()))
|
||||
@@ -41,7 +42,7 @@ def _callback(args):
|
||||
get_logger().error('%d files could not be pruned.', len(unremovable_files))
|
||||
get_logger().debug('Files could not be pruned:\n%s',
|
||||
'\n'.join(f for f in unremovable_files))
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user