mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Remove some debug statements
This commit is contained in:
parent
0068cd9825
commit
1a15b46d65
@ -34,7 +34,6 @@ def get_plugins(pkg, baseclass):
|
|||||||
|
|
||||||
# Iterate through each module in the package
|
# Iterate through each module in the package
|
||||||
for mod in modules:
|
for mod in modules:
|
||||||
print("mod:", mod)
|
|
||||||
# Iterate through each class in the module
|
# Iterate through each class in the module
|
||||||
for item in get_classes(mod):
|
for item in get_classes(mod):
|
||||||
plugin = item[1]
|
plugin = item[1]
|
||||||
|
@ -108,19 +108,23 @@ class BarcodePlugin:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def load_barcode_plugins():
|
def load_barcode_plugins(debug=False):
|
||||||
"""
|
"""
|
||||||
Function to load all barcode plugins
|
Function to load all barcode plugins
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if debug:
|
||||||
print("Loading barcode plugins")
|
print("Loading barcode plugins")
|
||||||
|
|
||||||
plugins = InvenTreePlugins.get_plugins(BarcodePlugins, BarcodePlugin)
|
plugins = InvenTreePlugins.get_plugins(BarcodePlugins, BarcodePlugin)
|
||||||
|
|
||||||
|
if debug:
|
||||||
if len(plugins) > 0:
|
if len(plugins) > 0:
|
||||||
print("Discovered {n} plugins:".format(n=len(plugins)))
|
print("Discovered {n} plugins:".format(n=len(plugins)))
|
||||||
|
|
||||||
for p in plugins:
|
for p in plugins:
|
||||||
print(" - {p}".format(p=p.PLUGIN_NAME))
|
print(" - {p}".format(p=p.PLUGIN_NAME))
|
||||||
|
else:
|
||||||
|
print("No barcode plugins found")
|
||||||
|
|
||||||
return plugins
|
return plugins
|
Loading…
Reference in New Issue
Block a user