4 from namespaces
import config_site
, config_prog
12 def is_trusted(self
, key
):
13 self
.ensure_uptodate()
14 return key
in self
.keys
16 def trust_key(self
, key
):
17 self
.ensure_uptodate()
21 def untrust_key(self
, key
):
22 self
.ensure_uptodate()
27 d
= basedir
.save_config_path(config_site
, config_prog
)
29 f
= file(os
.path
.join(d
, 'trust'), 'w')
34 def ensure_uptodate(self
):
35 trust
= basedir
.load_first_config(config_site
, config_prog
,
37 # This is a bit inefficient...
40 #print "Loading trust from", trust_db
41 for key
in file(trust
).read().split('\n'):