diff --git a/steam/steamid.py b/steam/steamid.py index b8b894f..f5f434c 100644 --- a/steam/steamid.py +++ b/steam/steamid.py @@ -1,7 +1,13 @@ +import sys import re from steam.enums.base import SteamIntEnum from steam.enums import EType, EUniverse +if sys.version_info < (3,): + intBase = long +else: + intBase = int + class ETypeChar(SteamIntEnum): I = EType.Invalid U = EType.Individual @@ -22,7 +28,7 @@ class ETypeChar(SteamIntEnum): ETypeChars = ''.join(map(str, list(ETypeChar))) -class SteamID(int): +class SteamID(intBase): """ Object for converting steamID to its' various representations diff --git a/tests/test_steamid.py b/tests/test_steamid.py index a779aa2..5485937 100644 --- a/tests/test_steamid.py +++ b/tests/test_steamid.py @@ -189,9 +189,6 @@ class SteamID_properties(unittest.TestCase): self.assertFalse(SteamID(10) < test_value) self.assertFalse(SteamID(10) <= test_value) - def test_is_instance_of_int(self): - self.assertIsInstance(SteamID(5), int) - def test_str(self): self.assertEqual(str(SteamID(76580280500085312)), '76580280500085312')