From 07e839553672b7eaab405f71a29f680d3e7f9def Mon Sep 17 00:00:00 2001 From: Data-Monkey Date: Wed, 17 May 2023 13:45:21 +1000 Subject: [PATCH] file path fixed --- front/plugins/undiscoverables/plugin_helper.py | 2 +- front/plugins/undiscoverables/script.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/front/plugins/undiscoverables/plugin_helper.py b/front/plugins/undiscoverables/plugin_helper.py index 31b46ae7..68634623 100644 --- a/front/plugins/undiscoverables/plugin_helper.py +++ b/front/plugins/undiscoverables/plugin_helper.py @@ -73,7 +73,7 @@ class Plugin_Objects: def write_result_file(self): - + # print ("writing file: "+self.result_file) with open(self.result_file, mode='w') as fp: for obj in self.objects: fp.write ( obj.write() ) diff --git a/front/plugins/undiscoverables/script.py b/front/plugins/undiscoverables/script.py index 6737ce1d..fa51e221 100644 --- a/front/plugins/undiscoverables/script.py +++ b/front/plugins/undiscoverables/script.py @@ -6,13 +6,13 @@ import sys import pathlib -from plugin_helper import Plugin_Objects, Plugin_Object +from plugin_helper import Plugin_Objects sys.dont_write_bytecode = True curPath = str(pathlib.Path(__file__).parent.resolve()) log_file = curPath + '/script.log' -result_file = curPath + '\last_result.log' +result_file = curPath + '/last_result.log' FAKE_DEVICES = ["routerXX","hubZZ"] @@ -25,14 +25,17 @@ def main(): for fake_dev in FAKE_DEVICES: devices.add_object(fake_dev, fake_dev, fake_dev, fake_dev, "", "", "", "") + + #for obj in devices.objects: + # print(obj.write()) devices.write_result_file() - return devices + return 0 #=============================================================================== # BEGIN #=============================================================================== if __name__ == '__main__': - d = main() \ No newline at end of file + main() \ No newline at end of file