diff --git a/InvenTree/InvenTree/plugins.py b/InvenTree/InvenTree/plugins.py index d0acb3fd8f..8da725bf9c 100644 --- a/InvenTree/InvenTree/plugins.py +++ b/InvenTree/InvenTree/plugins.py @@ -34,7 +34,6 @@ def get_plugins(pkg, baseclass): # Iterate through each module in the package for mod in modules: - print("mod:", mod) # Iterate through each class in the module for item in get_classes(mod): plugin = item[1] diff --git a/InvenTree/barcode/barcode.py b/InvenTree/barcode/barcode.py index 77fc64c4c6..f4d6c368b4 100644 --- a/InvenTree/barcode/barcode.py +++ b/InvenTree/barcode/barcode.py @@ -108,19 +108,23 @@ class BarcodePlugin: return False -def load_barcode_plugins(): +def load_barcode_plugins(debug=False): """ Function to load all barcode plugins """ - print("Loading barcode plugins") + if debug: + print("Loading barcode plugins") plugins = InvenTreePlugins.get_plugins(BarcodePlugins, BarcodePlugin) - if len(plugins) > 0: - print("Discovered {n} plugins:".format(n=len(plugins))) + if debug: + if len(plugins) > 0: + print("Discovered {n} plugins:".format(n=len(plugins))) - for p in plugins: - print(" - {p}".format(p=p.PLUGIN_NAME)) + for p in plugins: + print(" - {p}".format(p=p.PLUGIN_NAME)) + else: + print("No barcode plugins found") return plugins \ No newline at end of file