skeleton/debian/copyright.tmpl
author |
Pierre-Yves David <pierre-yves.david@logilab.fr> |
|
Wed, 07 Mar 2012 16:09:55 +0100 |
branch | stable |
changeset 8296 |
f23782a2cdee |
parent 365 |
5d8336b70aa7
|
child 8365 |
51c390500c63 |
permissions |
-rw-r--r-- |
rqlrewrite: remove element in rewritten when we remove them from the select (closes #2236985)
update _cleanup_inserted to avoid leaving rewritten variable behind when
removing a snipset.
insert_varmap_snippets was impacted too for unclear reason
---
Before
A KeyError was raised when:
* multiple snipset is to be inserted on a statement
* some *supported* snipset adds ambiguity (increase the number of solution)
* some *unsupported* snipset adds new variable
* The new variable require rewritting
::
File "/home/pyves/src/fcw/cubicweb/rqlrewrite.py", line 185, in rewrite
newsolutions = self.remove_ambiguities(snippets, newsolutions)
File "/home/pyves/src/fcw/cubicweb/rqlrewrite.py", line 436, in
remove_ambiguities
variantes = self.build_variantes(newsolutions)
File "/home/pyves/src/fcw/cubicweb/devtools/repotest.py", line 340, in
_build_variantes
variantes = _orig_build_variantes(self, newsolutions)
File "/home/pyves/src/fcw/cubicweb/rqlrewrite.py", line 470, in
build_variantes
variante.append( (key, sol[newvar]) )
KeyError: u'D'
This happen because the mechanism removing unsupported snipset does not remove
entry in ``self.rewritten`` when it removes entry from
``self.select.defined_vars``.
Iteration on ``self.rewritten`` then crash because values of ``rewritten`` are
expected to
be found in solution.
0
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
1 |
Upstream Author: |
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
2 |
|
365
|
3 |
%(author)s <%(author-email)s> |
0
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
4 |
|
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
5 |
Copyright: |
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
6 |
|
365
|
7 |
Copyright (c) %(year)s %(author)s. |
|
8 |
%(author-web-site)s -- mailto:%(author-email)s |