[Sugar-devel] [PATCH sugar] Removed hardcoded server url (SL #1976)
dipankar at seeta.in
Wed Oct 13 07:01:00 EDT 2010
Thanks for reviewing it, James.
> sn = read_ofw('mfg-data/SN')
> uuid_ = read_ofw('mfg-data/U#')
> sn = sn or 'SHF00000000'
> uuid_ = uuid_ or '00000000-0000-0000-0000-000000000000'
> > else:
> > sn = generate_serial_number()
> > uuid_ = str(uuid.uuid1())
> > - setting_name = '/desktop/sugar/collaboration/jabber_server'
> > - jabber_server = client.get_string(setting_name)
> > - store_identifiers(sn, uuid_, jabber_server)
> > +
> > + setting_name = '/desktop/sugar/collaboration/jabber_server'
> > + jabber_server = client.get_string(setting_name)
> > + store_identifiers(sn, uuid_, jabber_server)
> > +
> > + if jabber_server:
> > url = 'http://' + jabber_server + ':8080/'
> You are effectively repeating the previous if statement but using the
> output ... seems a bit obscure.
^^ Before applying this : The url (url for registration) was set from gconf
only for non-XO devices.
I moved that outside the first if..else you have quoted, so that on all
devices the url is taken from the gconf property
the second 'if jabber_server:' is put there to check whether the
jabber_server retrieved from the gcnof property is empty or unset. If
jabber_server is a valid one, then change url, other wise keep the url =
I actually went with the above modification due to the chain of mails here :
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Sugar-devel