Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Plugin.py errors #117

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions core/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
from utils.strings import chunkit, md5
from utils import rand
from utils.loggers import log
import collections
from collections.abc import Mapping
import re
import itertools
import base64
import datetime
import collections
import collections.abc
import threading
import time
import utils.config
Expand All @@ -18,8 +18,8 @@ def _recursive_update(d, u):
# Update value of a nested dictionary of varying depth

for k, v in u.items():
if isinstance(d, collections.Mapping):
if isinstance(v, collections.Mapping):
if isinstance(d, collections.abc.Mapping):
if isinstance(v, collections.abc.Mapping):
r = _recursive_update(d.get(k, {}), v)
d[k] = r
else:
Expand Down Expand Up @@ -711,7 +711,11 @@ def execute(self, code, **kwargs):
suffix = suffix,
blind = blind
)
return result.replace('\\n', '\n')
if result:
result = result.replace('\\n', '\n')

return result



def evaluate_blind(self, code, **kwargs):
Expand Down