equal
deleted
inserted
replaced
941 |
941 |
942 @property |
942 @property |
943 def minimal_rql(self): |
943 def minimal_rql(self): |
944 return 'Any %s WHERE %s' % (self.mainvars, self.expression) |
944 return 'Any %s WHERE %s' % (self.mainvars, self.expression) |
945 |
945 |
|
946 # these are overridden by set_log_methods below |
|
947 # only defining here to prevent pylint from complaining |
|
948 info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None |
|
949 |
946 |
950 |
947 class ERQLExpression(RQLExpression): |
951 class ERQLExpression(RQLExpression): |
948 def __init__(self, expression, mainvars=None, eid=None): |
952 def __init__(self, expression, mainvars=None, eid=None): |
949 RQLExpression.__init__(self, expression, mainvars or 'X', eid) |
953 RQLExpression.__init__(self, expression, mainvars or 'X', eid) |
950 |
954 |
1101 |
1105 |
1102 def unhandled_file(self, filepath): |
1106 def unhandled_file(self, filepath): |
1103 """called when a file without handler associated has been found""" |
1107 """called when a file without handler associated has been found""" |
1104 self.warning('ignoring file %r', filepath) |
1108 self.warning('ignoring file %r', filepath) |
1105 |
1109 |
|
1110 # these are overridden by set_log_methods below |
|
1111 # only defining here to prevent pylint from complaining |
|
1112 info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None |
1106 |
1113 |
1107 class CubicWebSchemaLoader(BootstrapSchemaLoader): |
1114 class CubicWebSchemaLoader(BootstrapSchemaLoader): |
1108 """cubicweb specific schema loader, automatically adding metadata to the |
1115 """cubicweb specific schema loader, automatically adding metadata to the |
1109 instance's schema |
1116 instance's schema |
1110 """ |
1117 """ |
1138 for cube in cubes: |
1145 for cube in cubes: |
1139 for filepath in self.get_schema_files(cube): |
1146 for filepath in self.get_schema_files(cube): |
1140 self.info('loading %s', filepath) |
1147 self.info('loading %s', filepath) |
1141 self.handle_file(filepath) |
1148 self.handle_file(filepath) |
1142 |
1149 |
|
1150 # these are overridden by set_log_methods below |
|
1151 # only defining here to prevent pylint from complaining |
|
1152 info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None |
1143 |
1153 |
1144 set_log_methods(CubicWebSchemaLoader, getLogger('cubicweb.schemaloader')) |
1154 set_log_methods(CubicWebSchemaLoader, getLogger('cubicweb.schemaloader')) |
1145 set_log_methods(BootstrapSchemaLoader, getLogger('cubicweb.bootstrapschemaloader')) |
1155 set_log_methods(BootstrapSchemaLoader, getLogger('cubicweb.bootstrapschemaloader')) |
1146 set_log_methods(RQLExpression, getLogger('cubicweb.schema')) |
1156 set_log_methods(RQLExpression, getLogger('cubicweb.schema')) |
1147 |
1157 |