Fix Python 3 issues
* Replace long with six.integer_type six.integer_type :In Python 2, this is long and int, and in Python 3, just int. 'long' is an undefined variable in py3. Change-Id: Ibe4c5d0d81fe883f4fe33be93a68d814a228ad28
This commit is contained in:
parent
170313d7db
commit
10f367224d
@ -19,7 +19,7 @@ Bindings to the `tee` and `splice` system calls
|
||||
|
||||
import os
|
||||
import operator
|
||||
|
||||
import six
|
||||
import ctypes
|
||||
import ctypes.util
|
||||
|
||||
@ -85,7 +85,7 @@ class Tee(object):
|
||||
if not self.available:
|
||||
raise EnvironmentError('tee not available')
|
||||
|
||||
if not isinstance(flags, (int, long)):
|
||||
if not isinstance(flags, six.integer_types):
|
||||
c_flags = reduce(operator.or_, flags, 0)
|
||||
else:
|
||||
c_flags = flags
|
||||
@ -176,7 +176,7 @@ class Splice(object):
|
||||
if not self.available:
|
||||
raise EnvironmentError('splice not available')
|
||||
|
||||
if not isinstance(flags, (int, long)):
|
||||
if not isinstance(flags, six.integer_types):
|
||||
c_flags = reduce(operator.or_, flags, 0)
|
||||
else:
|
||||
c_flags = flags
|
||||
|
Loading…
Reference in New Issue
Block a user