Skip to content

Commit

Permalink
simplify a PY3 usage to integer_types
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Sep 7, 2020
1 parent 9e864e5 commit 68974b5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/treq/multipart.py
Expand Up @@ -7,17 +7,14 @@
from io import BytesIO
from contextlib import closing

from six import PY3
from six import integer_types

from twisted.internet import defer, task
from twisted.python.compat import unicode
from twisted.web.iweb import UNKNOWN_LENGTH, IBodyProducer

from zope.interface import implementer

if PY3:
long = int

CRLF = b"\r\n"


Expand Down Expand Up @@ -304,7 +301,7 @@ def write(self, value):

if value is UNKNOWN_LENGTH:
self.length = value
elif isinstance(value, (int, long)):
elif isinstance(value, integer_types):
self.length += value
else:
self.length += len(value)
Expand Down

0 comments on commit 68974b5

Please sign in to comment.