Skip to content

Commit

Permalink
fix config.readfp
Browse files Browse the repository at this point in the history
  • Loading branch information
guohongze committed Aug 25, 2018
1 parent 15781ed commit 63bcc01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def index(request):
all_filter = ("OpenLDAP", "WindowsAD")
ldap_choice = ("True", "False")
with open(dirs+'/adminset.conf', 'r') as cfgfile:
config.read_file(cfgfile)
config.readfp(cfgfile)
a_path = config.get('config', 'ansible_path')
r_path = config.get('config', 'roles_path')
p_path = config.get('config', 'playbook_path')
Expand Down Expand Up @@ -162,7 +162,7 @@ def config_save(request):
with open(dirs+'/adminset.conf', 'wb') as cfgfile:
config.write(cfgfile)
with open(dirs+'/adminset.conf', 'r') as cfgfile:
config.read_file(cfgfile)
config.readfp(cfgfile)
a_path = config.get('config', 'ansible_path')
r_path = config.get('config', 'roles_path')
p_path = config.get('config', 'playbook_path')
Expand Down Expand Up @@ -206,7 +206,7 @@ def get_dir(args):
config = cp.RawConfigParser()
dirs = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
with open(dirs+'/adminset.conf', 'r') as cfgfile:
config.read_file(cfgfile)
config.readfp(cfgfile)
a_path = config.get('config', 'ansible_path')
r_path = config.get('config', 'roles_path')
p_path = config.get('config', 'playbook_path')
Expand Down

0 comments on commit 63bcc01

Please sign in to comment.