import re, sys
from bup import git, options
+from bup.compat import int_types
from bup.gc import bup_gc
from bup.helpers import die_if_errors, log, partition, period_as_secs
from bup.repo import LocalRepo
if not opt.unsafe:
o.fatal('refusing to run dangerous, experimental command without --unsafe')
-now = int(time()) if not opt.wrt else opt.wrt
-if not isinstance(now, (int, long)):
+now = int(time()) if opt.wrt is None else opt.wrt
+if not isinstance(now, int_types):
o.fatal('--wrt value ' + str(now) + ' is not an integer')
period_start = {}
from shlex import quote
range = range
str_type = str
+ int_types = (int,)
def add_ex_tb(ex):
"""Do nothing (already handled by Python 3 infrastructure)."""
from os import environ
range = xrange
str_type = basestring
+ int_types = (int, long)
def add_ex_tb(ex):
"""Add a traceback to ex if it doesn't already have one. Return ex.