]> arthur.barton.de Git - bup.git/commitdiff
Drop vestigial comapt.int_types
authorRob Browning <rlb@defaultvalue.org>
Sun, 9 Jan 2022 18:03:53 +0000 (12:03 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 16 Jan 2022 20:42:22 +0000 (14:42 -0600)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/cmd/prune_older.py
lib/bup/compat.py
lib/bup/main.py

index d5a8f1cf767690969e66f7d6228b295d4b869734..900abd9a502cc0b3defb78ab01986b84c77a7580 100755 (executable)
@@ -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 = {}
index 33e8c1da8cb6f9e1cd4f2f2dfec0569ec69bcc52..e34c23a6b52d415d50bf5fba80fb44148820e7ee 100644 (file)
@@ -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()
index b9654ccc625765a41bfc9eab33c741eb9c7b60d7..79ebca048d1a83bd9524b1b627d6091581c883dd 100755 (executable)
@@ -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))