def main():
if not shutil.which('borg'):
print('The \'borg\' command can\'t be found in the PATH. Please correctly install borgbackup first.')
print('See instructions at https://borgbackup.readthedocs.io/en/stable/installation.html')
return 1
parser = build_parser()
args = parser.parse_args()
logging.basicConfig(level=args.log_level, format='%(message)s')
if 'function' not in args:
return parser.print_help()
try:
return args.function(args)
except subprocess.CalledProcessError as cpe:
print('{} invocation failed with status {}'.format(cpe.cmd[0], cpe.returncode))
print('Command line was:', *[shlex.quote(s) for s in cpe.cmd])
return cpe.returncode
评论列表
文章目录