modify plugin's name, ignore the c file
@@ -9,6 +9,7 @@ import (
"fmt"
"io/ioutil"
"os"
+ "strings"
)
// Define global slices for storing all plugins
@@ -36,12 +37,15 @@ type PluginService struct {
// Register plugins
func RegisterPluginService(name string, f *os.File, info string) {
if name != "api.py" && name != "db_modules.py" && name != "lmp_influxdb.py" && name != "db_modules.pyc" && name != "lmp_influxdb.pyc" {
+ if !strings.HasSuffix(name,".c"){
PluginServices = append(PluginServices, &PluginService{
F : f,
- Name : name,
+ Name : strings.Trim(name, ".py"),
Info : info,
})
}
+
+ }
}
// Print the names of all plugins
