Thanks for your branch, that looks good. A small test would be good,
to ensure to not break this again in some future refactor. Should we
as simply as:
[..]
> === modified file 'softwarecenter/backend/recagent.py'
> --- softwarecenter/backend/recagent.py 2012-08-15 11:21:05 +0000
> +++ softwarecenter/backend/recagent.py 2012-08-27 21:19:21 +0000
> @@ -123,7 +123,7 @@
> if not recommender_uuid:
> # generate a new uuid, but do not save it yet, this will
> # be done later in _on_submit_profile_data
> - recommender_uuid = get_uuid()
> + recommender_uuid = get_uuid().replace("-", "")
My gut feeling is that the get_uuid() call should do the replace,
maybe as a new generate_recommender_uuid() call? Just so that its all
in one place. So that if the call is re-used there is no suprise that
the result is different from what the recommender agent expects.
On Mon, Aug 27, 2012 at 09:20:29PM -0000, Gary Lasker wrote:
> Gary Lasker has proposed merging lp:~gary-lasker/software-center/update-to-latest-recommender-client into lp:software-center.
Thanks for your branch, that looks good. A small test would be good,
to ensure to not break this again in some future refactor. Should we
as simply as:
def test_uuid_ conversion( self): config. recommender_ uuid = "xx-yy-zz" assertEqual( self.config. recommender_ uuid, "xxyyzz")
self.
self.
[..] /backend/ recagent. py' backend/ recagent. py 2012-08-15 11:21:05 +0000 backend/ recagent. py 2012-08-27 21:19:21 +0000 profile_ data ).replace( "-", "")
> === modified file 'softwarecenter
> --- softwarecenter/
> +++ softwarecenter/
> @@ -123,7 +123,7 @@
> if not recommender_uuid:
> # generate a new uuid, but do not save it yet, this will
> # be done later in _on_submit_
> - recommender_uuid = get_uuid()
> + recommender_uuid = get_uuid(
My gut feeling is that the get_uuid() call should do the replace, recommender_ uuid() call? Just so that its all
maybe as a new generate_
in one place. So that if the call is re-used there is no suprise that
the result is different from what the recommender agent expects.
Cheers,
Michael