Skip to content
This repository was archived by the owner on Dec 20, 2021. It is now read-only.

Commit d303fd7

Browse files
committed
Update baseobject.py
1 parent b50988b commit d303fd7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

vrcpy/baseobject.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import asyncio
22
import logging
33
from vrcpy.errors import ObjectErrors
4+
from enum import EnumMeta
45

56

67
class BaseObject:
@@ -16,8 +17,13 @@ def __init__(self, client, loop=None):
1617

1718
def _get_proper_obj(self, obj, t):
1819
if type(obj) is not t:
19-
if t is not dict and t is not list:
20+
if t is not dict and t is not list and t is not EnumMeta:
2021
return t(obj)
22+
elif t is EnumMeta:
23+
if type(obj) is str:
24+
return t(obj.upper())
25+
else:
26+
return t(obj)
2127

2228
return obj
2329

0 commit comments

Comments
 (0)