Permalink
Browse files

BF: robustify printout of svmc.__version__ which might not be avail

  • Loading branch information...
1 parent 0b386d6 commit 0af6853c50071958750da5e55661fe63e5f67f00 @yarikoptic committed Apr 30, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 mvpa2/clfs/libsvmc/_svm.py
@@ -408,8 +408,11 @@ def save(self, filename):
def __del__(self):
if __debug__:
- debug('SVM_', 'Destroying libsvm v. %s SVMModel %s'
- % (svmc.__version__, `self`))
+ # TODO: place libsvm versioning information into externals
+ debug('SVM_', 'Destroying libsvm v. %s SVMModel %s',
+ (hasattr(svmc, '__version__') \
+ and svmc.__version__ or "unknown",
+ `self`))
try:
svmc.svm_destroy_model_helper(self.model)
except Exception, e:

0 comments on commit 0af6853

Please sign in to comment.