Don't quit when _one_ record is invalid
[public/dnssec-swede-utility.git] / swede
diff --git a/swede b/swede
index 861211e85b9834b674f487bcd53c2e3d8efd27d5..ca204f7a6ee9ff54bcd44ac1deedbc70519b8b88 100755 (executable)
--- a/swede
+++ b/swede
@@ -295,7 +295,7 @@ class TLSARecord:
 
        def isNameValid(self):
                """Check if the name if in the correct format"""
-               if not re.match('^(_\d{1,5}|\*)\._(tcp|udp|sctp)\.([a-z0-9]*\.){2,}$', self.name):
+               if not re.match('^(_\d{1,5}|\*)\._(tcp|udp|sctp)\.([-a-z0-9]*\.){2,}$', self.name):
                        return False
                return True
 
@@ -424,7 +424,7 @@ if __name__ == '__main__':
                                record.isValid(raiseException=True)
                        except RecordValidityException, e:
                                print sys.stderr, 'Error: %s' % str(e)
-                               sys.exit(1)
+                               continue
                        else:
                                if not args.quiet:
                                        print 'This record is valid (well-formed).'