more readme
[errbot-exec.git] / exec.py
diff --git a/exec.py b/exec.py
index c7277ba7b340b964b891ab5135ca613223640cfc..207a4f929086cad397400ae1fdd4cbccecfe86d5 100644 (file)
--- a/exec.py
+++ b/exec.py
@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
-import os
-import re
-import subprocess
+import os, re, subprocess
 from errbot import BotPlugin, botcmd, re_botcmd
 from errbot.utils import ValidationException
 
@@ -30,6 +28,9 @@ class Exec(BotPlugin):
         if len(name) == 0:
             raise ValidationException('Command is empty')
 
+        if os.path.exists(name):
+            return
+
         found = False
         for path in os.environ['PATH'].split(os.pathsep):
             fullpath = path + os.sep + name