> > try: > > import pytz > > except ImportError: > > pytz = None > > > > if pytz: > > # pytz is there > > else: > > # no pytz > > Heh. I actually pondered doing it that way, but concluded "if > pytz_available:" was more readable / less cryptic.
Yeah, right. OTOH, we use this "module = None" thing also at other places, so feel free to use it there, too. And if you think of it as a question "pytz? -> there is None!" it maybe isn't even that cryptic. :) > How about deleting tz_offset from profiles only when they are saved with > a user-provided tz_name ? OK. BTW, you need to modify multiconfig.py to provide a wiki-wide default for tz_name (see the setting for the wiki-wide default for tz_offset). While this is not very useful for international internet wikis, it is quite useful for intranet or for local communities. The default for the wiki-wide tz_name default should be maybe that "not set" value. > This all makes sense, but there is one remaining issue: > > If we make Moin only optionally use pytz, what should it do when > encountering a pytz-enabled user profile when the pytz module is not > available? > > (e.g., if pytz was previously installed, but is no longer installed.) > > I vote that this is a corner case that is not worth putting too much > thought into, and that Moin should just revert to letting the affected > users configure their tz_offset, and using its configured default > tz_offset until they do. Exactly. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Moin-user mailing list Moin-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user