diff --git a/attributs.py b/attributs.py index c88a10f..3aeffc6 100644 --- a/attributs.py +++ b/attributs.py @@ -1292,7 +1292,7 @@ class sshFingerprint(Attr): else: raise ValueError("sshFingerprint should have a type dans a key field") else: - details = key.split() + details = key.strip().split() if len(details)<2: raise ValueError("Une clef ssh devrait être de la forme : 'format clef commentaire' comme 'ssh-dss AAAAB3NzaC… root@mon-pc' par exemple") self.value = { 'type' : details[0], @@ -1318,7 +1318,7 @@ class sshFingerprint(Attr): raise ValueError("sshFingerprint has no %r editable" % attr) def __unicode__(self): - return u'%(type)s %(key)s %(comm)s' % self.value + return (u'%(type)s %(key)s %(comm)s' % self.value).strip() @crans_attribute class gpgFingerprint(Attr):