Issue19995: %o, %x, %X now only accept ints
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index f4df6c7..aec7009 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -196,7 +196,7 @@
# A 0o200 byte indicates a positive number, a 0o377 byte a negative
# number.
if 0 <= n < 8 ** (digits - 1):
- s = bytes("%0*o" % (digits - 1, n), "ascii") + NUL
+ s = bytes("%0*o" % (digits - 1, int(n)), "ascii") + NUL
elif format == GNU_FORMAT and -256 ** (digits - 1) <= n < 256 ** (digits - 1):
if n >= 0:
s = bytearray([0o200])