[Sugar-devel] [PATCH sugar] Removed hardcoded server url (SL #1976)
James Cameron
quozl at laptop.org
Wed Oct 13 06:34:28 EDT 2010
On Wed, Oct 13, 2010 at 03:53:22PM +0530, Dipankar Patro wrote:
> Previously registration url was set hardcoded for XO device.
> Modififed the code for same behavior on all devices. Register url is taken from gconf prop.
> If the gconf is empty or unset, registration url falls back to 'schoolserver'.
Please text wrap your commit message.
> --- a/src/jarabe/desktop/schoolserver.py
> +++ b/src/jarabe/desktop/schoolserver.py
> @@ -89,9 +89,12 @@ def register_laptop(url=REGISTER_URL):
if have_ofw_tree():
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.
--
James Cameron
http://quozl.linux.org.au/
More information about the Sugar-devel
mailing list