mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-10 10:52:59 +02:00
Update filemon.py
This commit is contained in:
+11
-1
@@ -61,4 +61,14 @@ async def watch_file():
|
||||
content = content.replace('\n', ' ').replace('\r', '').strip()
|
||||
if content:
|
||||
return content
|
||||
await asyncio.sleep(1) # Check every
|
||||
await asyncio.sleep(1) # Check every
|
||||
|
||||
def call_external_script(message):
|
||||
# Call an external script runShell.sh
|
||||
try:
|
||||
output = os.popen(f"bash runShell.sh {message}").read()
|
||||
return output
|
||||
except Exception as e:
|
||||
logger.warning(f"FileMon: Error calling external script")
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user