From b75ccc003c7f2b04b8f7e435ae64f7854d79527f Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 9 Jan 2022 12:03:53 -0600 Subject: [PATCH] Drop vestigial comapt.int_types Signed-off-by: Rob Browning Tested-by: Rob Browning --- lib/bup/cmd/prune_older.py | 4 ++-- lib/bup/compat.py | 2 -- lib/bup/main.py | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/bup/cmd/prune_older.py b/lib/bup/cmd/prune_older.py index d5a8f1c..900abd9 100755 --- a/lib/bup/cmd/prune_older.py +++ b/lib/bup/cmd/prune_older.py @@ -7,7 +7,7 @@ from time import localtime, strftime, time import sys from bup import git, options -from bup.compat import argv_bytes, int_types +from bup.compat import argv_bytes from bup.gc import bup_gc from bup.helpers import die_if_errors, log, partition, period_as_secs from bup.io import byte_stream @@ -85,7 +85,7 @@ def main(argv): o.fatal('refusing to run dangerous, experimental command without --unsafe') now = int(time()) if opt.wrt is None else opt.wrt - if not isinstance(now, int_types): + if not isinstance(now, int): o.fatal('--wrt value ' + str(now) + ' is not an integer') period_start = {} diff --git a/lib/bup/compat.py b/lib/bup/compat.py index 33e8c1d..e34c23a 100644 --- a/lib/bup/compat.py +++ b/lib/bup/compat.py @@ -10,8 +10,6 @@ from os import environb as environ from os import fsdecode, fsencode from shlex import quote -int_types = (int,) - def hexstr(b): """Return hex string (not bytes as with hexlify) representation of b.""" return b.hex() diff --git a/lib/bup/main.py b/lib/bup/main.py index b9654cc..79ebca0 100755 --- a/lib/bup/main.py +++ b/lib/bup/main.py @@ -22,7 +22,6 @@ from bup.compat import ( add_ex_tb, environ, fsdecode, - int_types, wrap_main ) from bup.compat import add_ex_tb, add_ex_ctx, wrap_main @@ -234,7 +233,7 @@ def filter_output(srcs, dests): """ global sep_rx - assert all(isinstance(x, int_types) for x in srcs) + assert all(isinstance(x, int) for x in srcs) assert len(srcs) == len(dests) srcs = tuple(srcs) dest_for = dict(zip(srcs, dests)) -- 2.39.2