Development Team/Activities/Compatibility

From Sugar Labs
< Development Team
Revision as of 21:32, 23 February 2010 by Patrol (talk | contribs) (moved Walter is a wanker 12/Activities/Compatibility to Development Team/Activities/Compatibility over redirect: revert)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

As an example, instead of:

if sugar.version >= 0.82:
    keyHash = util.sha_data(key)
else:
    keyHash = util._sha_data(key)

you would code:

if hasattr(util, 'sha_data'):
    keyHash = util.sha_data(key)
else:
    keyHash = util._sha_data(key)