gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-bank] branch master updated: checking if db exists i


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: checking if db exists in 'django' subparser handler (still not swallowing the stacktrace)
Date: Mon, 15 May 2017 22:16:08 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new 068bf61  checking if db exists in 'django' subparser handler (still 
not swallowing the stacktrace)
068bf61 is described below

commit 068bf61aba7d25ce4e5e8ada05dc36309b29b6b0
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon May 15 22:15:34 2017 +0200

    checking if db exists in 'django' subparser handler
    (still not swallowing the stacktrace)
---
 taler-bank-manage.in    | 3 +++
 talerbank/app/checks.py | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/taler-bank-manage.in b/taler-bank-manage.in
index 92bbcad..095fff4 100644
--- a/taler-bank-manage.in
+++ b/taler-bank-manage.in
@@ -28,6 +28,9 @@ def handle_django(args):
     import django
     django.setup()
     from django.core.management import call_command
+    # Need this check first to detect if the database exists
+    # in the first place
+    call_command('check')
     # always run 'migrate' first, in case a virgin db gets
     # used.
     call_command('migrate')
diff --git a/talerbank/app/checks.py b/talerbank/app/checks.py
index 3654816..6734d3a 100644
--- a/talerbank/app/checks.py
+++ b/talerbank/app/checks.py
@@ -1,5 +1,5 @@
 from django.core.checks import register, Warning
-from django.db import OperationalError
+from django.db.utils import OperationalError
 
 
 @register()
@@ -17,7 +17,7 @@ def example_check(app_configs, **kwargs):
             ))
     except OperationalError:
             errors.append(Warning(
-                'The bank user does not exist',
+                'Presumably non existent database',
                 hint="create a database for the application",
                 id='talerbank.E002'
             ))

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]