[schema serialization] add warning on missing group stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 13 Apr 2011 12:50:31 +0200
branchstable
changeset 7219 d961184f9a86
parent 7217 4b860903d8c7
child 7220 eb0f5f46138f
[schema serialization] add warning on missing group
server/schemaserial.py
--- a/server/schemaserial.py	Wed Apr 13 11:34:53 2011 +0200
+++ b/server/schemaserial.py	Wed Apr 13 12:50:31 2011 +0200
@@ -557,6 +557,8 @@
                     yield ('SET X %s_permission Y WHERE Y eid %%(g)s, X eid %%(x)s' % action,
                            {'g': groupmap[group_or_rqlexpr]})
                 except KeyError:
+                    print ("WARNING: group %s used in permissions for %s was ignored because it doesn't exist."
+                           " You may want to add it into a precreate.py file" % (group_or_rqlexpr, erschema))
                     continue
             else:
                 # rqlexpr