[Dextrose] [PATCH sugar 2/2] Send XO serial numbers with anonymous reports

Anish Mangal anishmangal2002 at gmail.com
Thu Feb 3 19:58:55 EST 2011


Committed to dextrose/mainline

http://git.sugarlabs.org/dextrose/mainline/commit/ddcfc0d86e4483fdd4d990645018ced3217a0b2d

Thanks for working on this!

Reviewed-by: Anish Mangal <anish at activitycentral.org>
Acked-by: Anish Mangal <anish at activitycentral.org>

On Thu, Feb 3, 2011 at 17:29, Aleksey Lim <alsroot at member.fsf.org> wrote:
> ---
>  data/sugar.schemas.in                  |   11 +++++++++++
>  src/jarabe/model/feedback_collector.py |   10 ++++++++--
>  2 files changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/data/sugar.schemas.in b/data/sugar.schemas.in
> index 7e4a923..c3606f2 100644
> --- a/data/sugar.schemas.in
> +++ b/data/sugar.schemas.in
> @@ -24,6 +24,17 @@
>       </locale>
>     </schema>
>     <schema>
> +      <key>/schemas/desktop/sugar/feedback/anonymous_with_sn</key>
> +      <applyto>/desktop/sugar/feedback/anonymous_with_sn</applyto>
> +      <owner>sugar</owner>
> +      <type>bool</type>
> +      <default>false</default>
> +      <locale name="C">
> +        <short>Add XO serial numbers to anonymous submits</short>
> +        <long>Add XO serial numbers to anonymous submits.</long>
> +      </locale>
> +    </schema>
> +    <schema>
>       <key>/schemas/desktop/sugar/feedback/server_host</key>
>       <applyto>/desktop/sugar/feedback/server_host</applyto>
>       <owner>sugar</owner>
> diff --git a/src/jarabe/model/feedback_collector.py b/src/jarabe/model/feedback_collector.py
> index c0deae2..4671437 100644
> --- a/src/jarabe/model/feedback_collector.py
> +++ b/src/jarabe/model/feedback_collector.py
> @@ -47,7 +47,7 @@ def start(host, port, auto_submit_delay):
>     _port = port
>
>     if auto_submit_delay > 0:
> -        gobject.timeout_add_seconds(auto_submit_delay, _submit)
> +        gobject.timeout_add_seconds(auto_submit_delay, anonymous_submit)
>
>
>  def update(bundle_id, report, log_file):
> @@ -90,7 +90,13 @@ def submit(message):
>
>
>  def anonymous_submit():
> -    _submit()
> +    from jarabe.journal import misc
> +
> +    data = {}
> +    client = gconf.client_get_default()
> +    if client.get_bool('/desktop/sugar/feedback/anonymous_with_sn'):
> +        data['serial_number'] = misc.get_xo_serial()
> +    _submit(data)
>
>
>  def _submit(data=None):
> --
> 1.7.3.4
>
> _______________________________________________
> Dextrose mailing list
> Dextrose at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/dextrose
>



-- 
Anish


More information about the Dextrose mailing list