[Sugar-devel] [PATCH sugar] Construct the published name based on the public key OLPC #10737

Simon Schampijer simon at schampijer.de
Tue Mar 29 15:45:15 EDT 2011


On 03/29/2011 02:02 PM, Sascha Silbe wrote:
> Excerpts from Simon Schampijer's message of Tue Mar 29 18:37:19 +0200 2011:
>
>
> Acked-by: Sascha Silbe<silbe at activitycentral.com>
>
> If you care enough, some minor corrections would be:
>
>> Limit the name to be only 8 characters maximum. The avahi
>> service name has a 64 character limit. It consists of
>> the room name the published-name and the host name.
>                 ^ add comma   ^ s/-/ /
>
>> +    def _get_published_name(self):
>> +        """ Construct the published name based on the public key
>                ^ Remove space
>
>> +        Limit the name to be only 8 characters maximum. The avahi
>> +        service name has a 64 character limit. It consists of
>> +        the room name the published-name and the host name.
>
> See above.
>
>> +
>> +        """
>> +        public_key_hash = sha1(get_profile().pubkey).hexdigest()
>> +        return public_key_hash[:8]
>
> We should probably add a pubkey_hash property to sugar.profile.Profile.
> But not this time. :)
>
> Thanks for the patch!
>
> Sascha
>

Pushed with the requested polishing: 
20b5889739c2914e7613e238fce1be8747373eac

Thanks for the review,
    Simon


More information about the Sugar-devel mailing list