diff options
| author | Tim Graham <timograham@gmail.com> | 2014-05-18 17:42:03 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-05-18 17:42:03 -0400 |
| commit | c7a4ae94a0e2c5001b303a59b856f58e5d53f679 (patch) | |
| tree | b997a8fe4f912e3604d9e3777bdee50a5c1aa20c | |
| parent | ec9043ab2f6027da709d1daf0df5599db6a77453 (diff) | |
Removed some unnecessary exception naming; thanks claudep.
| -rw-r--r-- | django/core/management/__init__.py | 4 | ||||
| -rw-r--r-- | django/core/serializers/python.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index fdbf5c26eb..df21ed9aff 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -57,9 +57,9 @@ def find_management_module(app_name): # of the app_name but the project directory itself isn't on the path. try: f, path, descr = imp.find_module(part, path) - except ImportError as e: + except ImportError: if os.path.basename(os.getcwd()) != part: - raise e + raise else: if f: f.close() diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py index aa21598695..b84a89fdca 100644 --- a/django/core/serializers/python.py +++ b/django/core/serializers/python.py @@ -92,11 +92,11 @@ def Deserializer(object_list, **options): # Look up the model and starting build a dict of data for it. try: Model = _get_model(d["model"]) - except base.DeserializationError as e: + except base.DeserializationError: if ignore: continue else: - raise e + raise data = {} if 'pk' in d: data[Model._meta.pk.attname] = Model._meta.pk.to_python(d.get("pk", None)) |
