commit 35cbac3359f6d8ba4283311aab046722fcab7c99
Author: Giorgos Korfiatis <gkorf@grnet.gr>
Date:   Wed Feb 26 17:35:55 2014 +0200

    astakos: Use custom CommandError in mngt commands

diff --git a/snf-astakos-app/astakos/im/management/commands/_common.py b/snf-astakos-app/astakos/im/management/commands/_common.py
index 4ab7f96..0efed69 100644
--- a/snf-astakos-app/astakos/im/management/commands/_common.py
+++ b/snf-astakos-app/astakos/im/management/commands/_common.py
@@ -36,7 +36,7 @@ import uuid
 from django.core.validators import validate_email
 from django.contrib.auth.models import Permission
 from django.contrib.contenttypes.models import ContentType
-from django.core.management import CommandError
+from snf_django.management.commands import CommandError
 
 from synnefo.util import units
 from astakos.im.models import AstakosUser
diff --git a/snf-astakos-app/astakos/im/management/commands/_filtering.py b/snf-astakos-app/astakos/im/management/commands/_filtering.py
index 06d5d35..b9709b2 100644
--- a/snf-astakos-app/astakos/im/management/commands/_filtering.py
+++ b/snf-astakos-app/astakos/im/management/commands/_filtering.py
@@ -32,7 +32,7 @@
 # or implied, of GRNET S.A.
 
 from synnefo.util import units
-from django.core.management import CommandError
+from snf_django.management.commands import CommandError
 from django.db.models import Q
 
 
diff --git a/snf-astakos-app/astakos/im/management/commands/authpolicy-show.py b/snf-astakos-app/astakos/im/management/commands/authpolicy-show.py
index 0948222..3960947 100644
--- a/snf-astakos-app/astakos/im/management/commands/authpolicy-show.py
+++ b/snf-astakos-app/astakos/im/management/commands/authpolicy-show.py
@@ -31,11 +31,9 @@
 # interpreted as representing official policies, either expressed
 # or implied, of GRNET S.A.
 
-from django.core.management.base import CommandError
-
 from astakos.im.models import AuthProviderPolicyProfile as Profile
 from synnefo.lib.ordereddict import OrderedDict
-from snf_django.management.commands import SynnefoCommand
+from snf_django.management.commands import SynnefoCommand, CommandError
 from snf_django.management import utils
 
 
diff --git a/snf-astakos-app/astakos/im/management/commands/component-show.py b/snf-astakos-app/astakos/im/management/commands/component-show.py
index a0eef4e..a468b80 100644
--- a/snf-astakos-app/astakos/im/management/commands/component-show.py
+++ b/snf-astakos-app/astakos/im/management/commands/component-show.py
@@ -31,10 +31,9 @@
 # interpreted as representing official policies, either expressed
 # or implied, of GRNET S.A.
 
-from django.core.management.base import CommandError
 from astakos.im.models import Component
 from synnefo.lib.ordereddict import OrderedDict
-from snf_django.management.commands import SynnefoCommand
+from snf_django.management.commands import SynnefoCommand, CommandError
 from snf_django.management import utils
 
 
diff --git a/snf-astakos-app/astakos/im/management/commands/fix-superusers.py b/snf-astakos-app/astakos/im/management/commands/fix-superusers.py
index 6fda2a4..e047a18 100644
--- a/snf-astakos-app/astakos/im/management/commands/fix-superusers.py
+++ b/snf-astakos-app/astakos/im/management/commands/fix-superusers.py
@@ -35,7 +35,7 @@ from optparse import make_option
 from datetime import datetime
 
 from django.db import transaction
-from django.core.management.base import NoArgsCommand, CommandError
+from snf_django.management.commands import SynnefoCommand, CommandError
 
 from astakos.im.auth import fix_superusers
 
diff --git a/snf-astakos-app/astakos/im/management/commands/project-show.py b/snf-astakos-app/astakos/im/management/commands/project-show.py
index 1b756d4..213f32a 100644
--- a/snf-astakos-app/astakos/im/management/commands/project-show.py
+++ b/snf-astakos-app/astakos/im/management/commands/project-show.py
@@ -32,10 +32,9 @@
 # or implied, of GRNET S.A.
 
 from optparse import make_option
-from django.core.management.base import CommandError
 
 from synnefo.lib.ordereddict import OrderedDict
-from snf_django.management.commands import SynnefoCommand
+from snf_django.management.commands import SynnefoCommand, CommandError
 from snf_django.management import utils
 from astakos.im.models import ProjectApplication, Project
 from astakos.im import quotas
diff --git a/snf-astakos-app/astakos/im/management/commands/service-show.py b/snf-astakos-app/astakos/im/management/commands/service-show.py
index 3cb9a04..9cd0289 100644
--- a/snf-astakos-app/astakos/im/management/commands/service-show.py
+++ b/snf-astakos-app/astakos/im/management/commands/service-show.py
@@ -31,10 +31,9 @@
 # interpreted as representing official policies, either expressed
 # or implied, of GRNET S.A.
 
-from django.core.management.base import CommandError
 from astakos.im.models import Service, EndpointData
 from synnefo.lib.ordereddict import OrderedDict
-from snf_django.management.commands import SynnefoCommand
+from snf_django.management.commands import SynnefoCommand, CommandError
 from snf_django.management import utils
 
 
diff --git a/snf-astakos-app/astakos/im/management/commands/user-show.py b/snf-astakos-app/astakos/im/management/commands/user-show.py
index 5a14031..6e50284 100644
--- a/snf-astakos-app/astakos/im/management/commands/user-show.py
+++ b/snf-astakos-app/astakos/im/management/commands/user-show.py
@@ -31,7 +31,6 @@
 # interpreted as representing official policies, either expressed
 # or implied, of GRNET S.A.
 
-from django.core.management.base import CommandError
 from optparse import make_option
 
 from django.db.models import Q
@@ -39,7 +38,7 @@ from astakos.im.models import AstakosUser, get_latest_terms, Project
 from astakos.im.quotas import get_user_quotas
 
 from synnefo.lib.ordereddict import OrderedDict
-from snf_django.management.commands import SynnefoCommand
+from snf_django.management.commands import SynnefoCommand, CommandError
 from snf_django.management import utils
 
 from ._common import show_user_quotas, style_options, check_style
diff --git a/snf-astakos-app/astakos/oa2/management/commands/oauth2-client-add.py b/snf-astakos-app/astakos/oa2/management/commands/oauth2-client-add.py
index 6a6fe47..21742ce 100644
--- a/snf-astakos-app/astakos/oa2/management/commands/oauth2-client-add.py
+++ b/snf-astakos-app/astakos/oa2/management/commands/oauth2-client-add.py
@@ -34,9 +34,8 @@
 from optparse import make_option
 
 from django.db import transaction
-from django.core.management.base import CommandError
 
-from snf_django.management.commands import SynnefoCommand
+from snf_django.management.commands import SynnefoCommand, CommandError
 
 from astakos.oa2.models import Client, RedirectUrl
 from astakos.oa2 import settings
diff --git a/snf-astakos-app/astakos/oa2/management/commands/oauth2-client-remove.py b/snf-astakos-app/astakos/oa2/management/commands/oauth2-client-remove.py
index a4075c2..e852918 100644
--- a/snf-astakos-app/astakos/oa2/management/commands/oauth2-client-remove.py
+++ b/snf-astakos-app/astakos/oa2/management/commands/oauth2-client-remove.py
@@ -31,12 +31,12 @@
 # interpreted as representing official policies, either expressed
 # or implied, of GRNET S.A.
 
-from django.core.management.base import BaseCommand, CommandError
+from snf_django.management.commands import SynnefoCommand, CommandError
 from django.db import transaction
 from astakos.oa2.models import Client
 
 
-class Command(BaseCommand):
+class Command(SynnefoCommand):
     args = "<client ID or identifier>"
     help = "Remove an oauth2 client along with its registered redirect urls"
 
diff --git a/snf-astakos-app/astakos/quotaholder_app/management/commands/commission-list.py b/snf-astakos-app/astakos/quotaholder_app/management/commands/commission-list.py
index fdb6a2e..a93efac 100644
--- a/snf-astakos-app/astakos/quotaholder_app/management/commands/commission-list.py
+++ b/snf-astakos-app/astakos/quotaholder_app/management/commands/commission-list.py
@@ -31,8 +31,7 @@
 # interpreted as representing official policies, either expressed
 # or implied, of GRNET S.A.
 
-from django.core.management.base import CommandError
-from snf_django.management.commands import ListCommand
+from snf_django.management.commands import ListCommand, CommandError
 
 from optparse import make_option
 from astakos.quotaholder_app.models import Commission
diff --git a/snf-astakos-app/astakos/quotaholder_app/management/commands/commission-show.py b/snf-astakos-app/astakos/quotaholder_app/management/commands/commission-show.py
index d3ecf0a..b1cf6b9 100644
--- a/snf-astakos-app/astakos/quotaholder_app/management/commands/commission-show.py
+++ b/snf-astakos-app/astakos/quotaholder_app/management/commands/commission-show.py
@@ -31,8 +31,7 @@
 # interpreted as representing official policies, either expressed
 # or implied, of GRNET S.A.
 
-from django.core.management.base import CommandError
-from snf_django.management.commands import SynnefoCommand
+from snf_django.management.commands import SynnefoCommand, CommandError
 from snf_django.management import utils
 
 from astakos.quotaholder_app.models import Commission, Provision
