[Erp5-report] r24742 - /erp5/trunk/products/ERP5Type/Utils.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Nov 28 15:17:38 CET 2008
Author: romain
Date: Fri Nov 28 15:17:37 2008
New Revision: 24742
URL: http://svn.erp5.org?rev=24742&view=rev
Log:
Prevent ImportError if pytz is not installed.
Modified:
erp5/trunk/products/ERP5Type/Utils.py
Modified: erp5/trunk/products/ERP5Type/Utils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Utils.py?rev=24742&r1=24741&r2=24742&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Utils.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Utils.py [utf8] Fri Nov 28 15:17:37 2008
@@ -2598,7 +2598,10 @@
def getCommonTimeZoneList():
""" Get common (country/capital(major cities) format) timezones list """
- from pytz import common_timezones
+ try:
+ from pytz import common_timezones
+ except ImportError:
+ return []
return common_timezones
More information about the Erp5-report
mailing list