Skip to content

handle import failure of matplotlib

Andreas Hasenack requested to merge ahasenack/samba:master-samba-gitlab into master

Instead of backtracing, print a helpful message when matplotlib cannot be imported.

python3-matplotlib in Ubuntu is in the Universe pocket, so we cannot have samba depending on it directly. We can downgrade that dependency to a suggestion ("Suggests" instead of "Depends" or "Recommends"), but it would help if instead of backtracing, the tool handled the missing dependency nicely.

That being said, I couldn't figure out how script/attr_count_read is called. Debian implied it was via samba-tool visualize, since they added the python3-matplotlib dependency to the package containing samba-tool. Did I miss another place where python3-matplotlib is imported?

Merge request reports