From 181f2ec603dd01d3c38ff1a57849d5ed1642a4ff Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 19 May 2013 14:38:16 +0200 Subject: [PATCH] Fixed test failures with Oracle when pytz isn't installed. Thanks Shai Berger for the report. --- django/db/backends/oracle/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 6338ae09e7..0398afb960 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -44,6 +44,11 @@ except ImportError as e: from django.core.exceptions import ImproperlyConfigured raise ImproperlyConfigured("Error loading cx_Oracle module: %s" % e) +try: + import pytz +except ImportError: + pytz = None + from django.db import utils from django.db.backends import * from django.db.backends.oracle.client import DatabaseClient @@ -77,6 +82,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): supports_subqueries_in_group_by = False supports_transactions = True supports_timezones = False + has_zoneinfo_database = pytz is not None supports_bitwise_or = False can_defer_constraint_checks = True ignores_nulls_in_unique_constraints = False