aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaralorn2019-10-11 23:27:23 +0200
committermaralorn2019-10-11 23:27:23 +0200
commit6275c8b78c0ed120d20311ed22f5eca79a786077 (patch)
tree91ae84f4ac79bb1b6a1f45b8d630928070b9e31d
parent2c1dfa1a7beaf2ff295cb4cef4dfb3c3c540d583 (diff)
parenta3758664541e508884e6c0b0668bcbccffa2bb04 (diff)
downloadjali-6275c8b78c0ed120d20311ed22f5eca79a786077.tar.gz
jali-6275c8b78c0ed120d20311ed22f5eca79a786077.zip
Merge branch 'no_aqbanking' into 'master'
Handle aqbanking not being installed and no config See merge request jali/jali!15
-rw-r--r--jali/config.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/jali/config.py b/jali/config.py
index 2a363bc..2b11fd3 100644
--- a/jali/config.py
+++ b/jali/config.py
@@ -26,10 +26,15 @@ else:
26 26
27 sys.exit(1) 27 sys.exit(1)
28 28
29def get_banks():
30 user_xml = xml.dom.minidom.parseString(subprocess.check_output(["aqhbci-tool4", "listusers", "--xml"])).getElementsByTagName("user")
31 29
30def get_banks():
32 banks = [] 31 banks = []
32 try:
33 user_xml = xml.dom.minidom.parseString(subprocess.check_output(["aqhbci-tool4", "listusers", "--xml"])).getElementsByTagName("user")
34 except FileNotFoundError:
35 logging.critical("No aqhbci-tool4 found, unable to get accounts")
36 return banks
37
33 if len(user_xml) == 0: 38 if len(user_xml) == 0:
34 logging.critical('You have no aqbanking users configured.'.format(config_dir)) 39 logging.critical('You have no aqbanking users configured.'.format(config_dir))
35 return banks 40 return banks
@@ -103,7 +108,8 @@ accounting_defaults = {
103 "auto_confirm": False, 108 "auto_confirm": False,
104 "match_direct_confirm": True, 109 "match_direct_confirm": True,
105 "banks": [], 110 "banks": [],
106 "member_db": None 111 "member_db": None,
112 "locale": "de",
107} 113}
108 114
109def augmented_accounting_defaults(accounting): 115def augmented_accounting_defaults(accounting):