mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Fix object decoder breaking on re.Match objects
This commit is contained in:
parent
3e900214f4
commit
91ebe5f2a8
@ -16,6 +16,7 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import re
|
||||
from collections import OrderedDict
|
||||
from datetime import datetime
|
||||
from json import dumps
|
||||
@ -47,6 +48,9 @@ class Object(metaclass=Meta):
|
||||
if isinstance(obj, bytes):
|
||||
return repr(obj)
|
||||
|
||||
if isinstance(obj, re.Match):
|
||||
return repr(obj)
|
||||
|
||||
return OrderedDict(
|
||||
[("_", "pyrogram." + obj.__class__.__name__)]
|
||||
+ [
|
||||
|
Loading…
x
Reference in New Issue
Block a user