[sysadmin-bin] simplify maintainer mbox check



commit 8c1bc1d2b7678f7339e684467cf80b9401461ce5
Author: Olav Vitters <olav vitters nl>
Date:   Sun Aug 3 00:37:04 2014 +0200

    simplify maintainer mbox check

 git/validate-doap |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/git/validate-doap b/git/validate-doap
index d188d5f..54d137b 100755
--- a/git/validate-doap
+++ b/git/validate-doap
@@ -98,9 +98,7 @@ for node in nodes:
                 have_maintainer = True
             mbox = maintainer.find_property((FOAF, "mbox"))
             if mbox is not None:
-                if not is_resource(mbox):
-                    die("Invalid foaf:mbox property (should be an URL)")
-                if not mbox.startswith("mailto:";):
+                if not is_resource(mbox) or not mbox.startswith("mailto:";):
                     die("Invalid foaf:mbox property should be a mailto: URL")
 
     if not have_maintainer:


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