Skip to content

Commit 8c01848

Browse files
committed
Naively check keys on load of ini
1 parent 67bd4ac commit 8c01848

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bpython/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
from ConfigParser import ConfigParser, NoSectionError, NoOptionError
33
from itertools import chain
4-
4+
from bpython.keys import key_dispatch
55

66
class Struct(object):
77
"""Simple class for instantiating objects we can add arbitrary attributes
@@ -68,6 +68,10 @@ def loadini(struct, configfile):
6868
load_theme(struct, path)
6969

7070

71+
# checks for valid key configuration this part still sucks
72+
for key in (struct.pastebin_key, struct.save_key):
73+
key_dispatch[key]
74+
7175
def load_theme(struct, path):
7276
theme = CP()
7377
f = open(path, 'r')

0 commit comments

Comments
 (0)