From 1a15b46d65b0a01107ea6b5fb47d1a2394deb86c Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 11 Jun 2020 11:14:02 +1000 Subject: [PATCH] Remove some debug statements --- InvenTree/InvenTree/plugins.py | 1 - InvenTree/barcode/barcode.py | 16 ++++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) 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