[sysadmin-bin: 102/168] Make MAINTAINERS file parsing more lenient



commit c2ee84d9cd7949ad6ef699dea6d8a356dfb2a870
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Fri Apr 24 19:23:28 2009 -0400

    Make MAINTAINERS file parsing more lenient
    
    We're just doing this for compat, so don't require a colon after
    the field name and silently ignore lines we don't understand.

 doap-from-maintainers |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/doap-from-maintainers b/doap-from-maintainers
index a175287..ce35326 100755
--- a/doap-from-maintainers
+++ b/doap-from-maintainers
@@ -44,14 +44,12 @@ for l in data.splitlines():
     if nr == 1:
         name = l
     elif ":" in l:
-        field, value = l.split(": ", 1)
-        field = field.rstrip()
+        field, value = l.split(":", 1)
+        field = field.strip()
         value = value.strip().lower()
         if field == 'E-mail' or field == 'E-Mail' or field == 'Email' or field == 'EMail':
             email = value
         elif field == 'Userid':
             uid = value
-        else:
-            print "ERROR: Strange field: %s (module: %s)" % (field, modname)
 
 semi_rdf.dump_rdf(nodes, sys.stdout)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]