aboutsummaryrefslogtreecommitdiff
path: root/ca/irbe_cli
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-09-16 18:29:46 +0000
committerRob Austein <sra@hactrn.net>2014-09-16 18:29:46 +0000
commit180a9c09f9705283e11caa2df408e6b2353f3b9d (patch)
treea0861ddd006017e9f4fe754bd1abefa36a9a73cb /ca/irbe_cli
parentc02686daf6dcc4175f119adc5d19261f577b2856 (diff)
parent7c2fb9ca36f120369797072e534041daae6cd8f9 (diff)
Merge changes from branches/tk713 into branches/tk705. See #705, #713.
svn path=/branches/tk705/; revision=5956
Diffstat (limited to 'ca/irbe_cli')
-rwxr-xr-xca/irbe_cli31
1 files changed, 17 insertions, 14 deletions
diff --git a/ca/irbe_cli b/ca/irbe_cli
index 1becd403..cd9c2165 100755
--- a/ca/irbe_cli
+++ b/ca/irbe_cli
@@ -305,7 +305,7 @@ for o, a in opts:
if not argv:
usage(1)
-cfg = rpki.config.parser(cfg_file, "irbe_cli")
+cfg = rpki.config.parser(set_filename = cfg_file, section = "irbe_cli")
q_msg_left_right = []
q_msg_publication = []
@@ -322,19 +322,22 @@ while argv:
argv = q_pdu.client_getopt(argv[1:])
q_msg.append(q_pdu)
-from django.conf import settings
-
-settings.configure(
- DATABASES = { "default" : {
- "ENGINE" : "django.db.backends.mysql",
- "NAME" : cfg.get("sql-database", section = "irdbd"),
- "USER" : cfg.get("sql-username", section = "irdbd"),
- "PASSWORD" : cfg.get("sql-password", section = "irdbd"),
- "HOST" : "",
- "PORT" : "",
- "OPTIONS" : { "init_command": "SET storage_engine=INNODB" }}},
- INSTALLED_APPS = ("rpki.irdb",),
-)
+if True:
+ os.environ.update(DJANGO_SETTINGS_MODULE = "rpki.django_settings")
+
+else:
+ from django.conf import settings
+ settings.configure(
+ DATABASES = { "default" : {
+ "ENGINE" : "django.db.backends.mysql",
+ "NAME" : cfg.get("sql-database", section = "irdbd"),
+ "USER" : cfg.get("sql-username", section = "irdbd"),
+ "PASSWORD" : cfg.get("sql-password", section = "irdbd"),
+ "HOST" : "",
+ "PORT" : "",
+ "OPTIONS" : { "init_command": "SET storage_engine=INNODB" }}},
+ INSTALLED_APPS = ("rpki.irdb",),
+ )
import rpki.irdb