Check that the type in Colour and Permissions are int.

This commit is contained in:
Rapptz committed 2017-02-21 08:19:32 -05:00
1 parent b7488d7c6e
commit 702d596af9
2 files changed
+7 -1

No files matched your search

+3
View File
@@ -69,6 +69,9 @@ class Permissions:
__slots__ = ('value',)
def __init__(self, permissions=0):
if not isinstance(permissions, int):
raise TypeError('Expected int parameter, received %s instead.' % permissions.__class__.__name__)
self.value = permissions
def __eq__(self, other):