From: Thibault Saunier Date: Thu, 22 Feb 2018 11:05:24 +0000 (-0300) Subject: bitmask: Do not use long() directly with python3 X-Git-Tag: 1.19.3~485^2~82 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=693005716ecaa089991dc5de283186ee87d9906c;p=platform%2Fupstream%2Fgstreamer.git bitmask: Do not use long() directly with python3 It doesn't exist anymore there --- diff --git a/gi/overrides/Gst.py b/gi/overrides/Gst.py index b0a0ad4..07852c6 100644 --- a/gi/overrides/Gst.py +++ b/gi/overrides/Gst.py @@ -35,6 +35,7 @@ from gi.repository import GLib if sys.version_info >= (3, 0): _basestring = str _callable = lambda c: hasattr(c, '__call__') + long = int else: _basestring = basestring _callable = callable diff --git a/testsuite/test_types.py b/testsuite/test_types.py index 5e2241f..593012c 100644 --- a/testsuite/test_types.py +++ b/testsuite/test_types.py @@ -396,4 +396,7 @@ class TestBitmask(TestCase): Gst.init(None) r = Gst.Bitmask(1 << 5) - self.assertEqual(str(r), '0x20L') + if sys.version_info >= (3, 0): + self.assertEqual(str(r), '0x20') + else: + self.assertEqual(str(r), '0x20L')