Show More
@@ -1135,12 +1135,15 b' class ui(object):' | |||||
1135 | ''' |
|
1135 | ''' | |
1136 | return msg |
|
1136 | return msg | |
1137 |
|
1137 | |||
1138 | def develwarn(self, msg, stacklevel=1): |
|
1138 | def develwarn(self, msg, stacklevel=1, config=None): | |
1139 | """issue a developer warning message |
|
1139 | """issue a developer warning message | |
1140 |
|
1140 | |||
1141 | Use 'stacklevel' to report the offender some layers further up in the |
|
1141 | Use 'stacklevel' to report the offender some layers further up in the | |
1142 | stack. |
|
1142 | stack. | |
1143 | """ |
|
1143 | """ | |
|
1144 | if not self.configbool('devel', 'all-warnings'): | |||
|
1145 | if config is not None and not self.configbool('devel', config): | |||
|
1146 | return | |||
1144 | msg = 'devel-warn: ' + msg |
|
1147 | msg = 'devel-warn: ' + msg | |
1145 | stacklevel += 1 # get in develwarn |
|
1148 | stacklevel += 1 # get in develwarn | |
1146 | if self.tracebackflag: |
|
1149 | if self.tracebackflag: |
General Comments 0
You need to be logged in to leave comments.
Login now