1
0
mirror of https://github.com/jtesta/ssh-audit.git synced 2025-07-04 13:02:49 -05:00

Fix software representation. Add software tests.

This commit is contained in:
Andris Raugulis
2016-10-05 03:27:43 +03:00
parent 489a24c564
commit aee949a717
2 changed files with 287 additions and 2 deletions

View File

@ -567,7 +567,7 @@ class SSH(object):
return self.display()
def __repr__(self):
out = 'vendor={0} '.format(self.vendor) if self.vendor else ''
out = 'vendor={0}'.format(self.vendor) if self.vendor else ''
if self.product:
if self.vendor:
out += ', '
@ -582,7 +582,7 @@ class SSH(object):
@staticmethod
def _fix_patch(patch):
return re.sub(r'^[-_\.]+', '', patch)
return re.sub(r'^[-_\.]+', '', patch) or None
@staticmethod
def _fix_date(d):