bots: Simplify naughty directory reading
bots: Simplify naughty directory reading

list_directories() is overkill for our case where we can only have one
or no directory. Drop it and simplify the code in check_known_issue().

Also use None instead of 0 as return value if an issue is not known.

Closes #7853

larskarlitski/cockpit,stefwalter/cockpit,andreasn/cockpit,mareklibra/cockpit,deryni/cockpit,larskarlitski/cockpit,cockpit-project/cockpit,petervo/cockpit,SotolitoLabs/cockpit,Scribery/cockpit,garrett/cockpit,larskarlitski/cockpit,deryni/cockpit,larskarlitski/cockpit,mareklibra/cockpit,mvollmer/cockpit,deryni/cockpit,moraleslazaro/cockpit,larsu/cockpit,mareklibra/cockpit,larsu/cockpit,petervo/cockpit,Scribery/cockpit,deryni/cockpit,cockpituous/cockpit,SotolitoLabs/cockpit,martinpitt/cockpit,larsu/cockpit,petervo/cockpit,petervo/cockpit,larsu/cockpit,moraleslazaro/cockpit,petervo/cockpit,SotolitoLabs/cockpit,andreasn/cockpit,larskarlitski/cockpit,deryni/cockpit,SotolitoLabs/cockpit,mvollmer/cockpit,stefwalter/cockpit,deryni/cockpit,garrett/cockpit,larskarlitski/cockpit,stefwalter/cockpit,mareklibra/cockpit,andreasn/cockpit,stefwalter/cockpit,andreasn/cockpit,martinpitt/cockpit,andreasn/cockpit,moraleslazaro/cockpit,larsu/cockpit,moraleslazaro/cockpit,garrett/cockpit,stefwalter/cockpit,petervo/cockpit,Scribery/cockpit,Scribery/cockpit,Scribery/cockpit,cockpituous/cockpit,moraleslazaro/cockpit,mvollmer/cockpit,mareklibra/cockpit,martinpitt/cockpit,mvollmer/cockpit,deryni/cockpit,SotolitoLabs/cockpit,larskarlitski/cockpit,andreasn/cockpit,cockpituous/cockpit,Scribery/cockpit,martinpitt/cockpit,SotolitoLabs/cockpit,stefwalter/cockpit,moraleslazaro/cockpit,cockpituous/cockpit,mareklibra/cockpit,martinpitt/cockpit,cockpituous/cockpit,mvollmer/cockpit,stefwalter/cockpit,garrett/cockpit,larsu/cockpit,moraleslazaro/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,petervo/cockpit,mareklibra/cockpit,andreasn/cockpit,Scribery/cockpit,cockpituous/cockpit,cockpit-project/cockpit,garrett/cockpit,cockpit-project/cockpit,SotolitoLabs/cockpit