id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,distribution,status_field
196,"sugar-jhbuild: sugar-session: timezone check broken, causing traceback and exit",sascha_silbe,marcopg,"AFAIUI, sugar-session tries to get a config entry for the timezone. If there's one, it will set the environment variable TZ.
To check whether there's a config entry, it compares it with the empty string. But at least on Debian lenny, gconf will return None instead, so the sugar-session tries to assign None to an environment variable, which fails.

Traceback (most recent call last):
  File ""/home/sascha.silbe/src/sugar/sugar-jhbuild/install/bin/sugar-session"", line 170, in <module>
    main()
  File ""/home/sascha.silbe/src/sugar/sugar-jhbuild/install/bin/sugar-session"", line 137, in main
    os.environ['TZ'] = timezone
  File ""/usr/lib/python2.5/os.py"", line 474, in __setitem__
    putenv(key, item)
TypeError: putenv() argument 2 must be string, not None


Relevant code snippet:

    client = gconf.client_get_default()
    timezone = client.get_string('/desktop/sugar/date/timezone')

    if timezone is not '':
        os.environ['TZ'] = timezone


Replacing ""if timezone is not '':"" with ""if not timezone:"" will handle both None and the empty string as expected.

",defect,closed,major,,sugar,Git as of bugdate,,fixed,,,,
