diff options
| author | 2018-10-01 13:48:55 +0100 | |
|---|---|---|
| committer | 2018-10-01 13:48:55 +0100 | |
| commit | 59243f492f9f407d08c2e8551c070a4205fc9aed (patch) | |
| tree | 17baebc88929966518feb0414063d9838b8be109 /modules/scripts.py | |
| parent | Add 'trace' logging level for src/Database.py and src/EventManager.py very (diff) | |
| signature | ||
Implement src/IRCObject.py to convert specific objects in to strings when
passing them to modules/scripts.py scripts
Diffstat (limited to 'modules/scripts.py')
| -rw-r--r-- | modules/scripts.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/scripts.py b/modules/scripts.py index c9965cd8..915cea62 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -1,6 +1,6 @@ import glob, json, os, subprocess -from src import Utils +from src import IRCObject, Utils class Module(object): def __init__(self, bot, events, exports): @@ -37,6 +37,8 @@ class Module(object): env[key.upper()] = str(int(value)) elif isinstance(value, (list, dict)): env[key.upper()] = json.dumps(value) + elif isinstance(value, (IRCObject.Object,)): + env[key.upper()] = str(value) proc = subprocess.Popen([filename], stdout=subprocess.PIPE, env=env) try: |
