Hi, struggling a bit to see what needs to be done here. In my development and testing I'm not getting any tracebacks even if python-swiftclient is not installed, and I'm logging to ERROR a message if you try to use the swift.py module without installing it so there's some feedback for the user (you only see this in the minion log though). So the import statement shouldn't need an explicit try/catch in other code that uses it.

Fileclient.py imports salt.utils.openstack.swift, when a SaltSwift object is instantiated without the library that returns None, so trying to use it will throw an exception further on.

What would be an improvement would be to, as discussed with @s0undt3ch below, to catch different exceptions in swift.py and pass up more useful information in exceptions raised to fileclient.py, i.e. the reason why it's breaking.

Please let me know your thoughts.