Skip to content
Snippets Groups Projects
Commit a86da81f authored by Svetlana Tkachenko's avatar Svetlana Tkachenko
Browse files

+edit configuration file option - update

parent b1dc7d6c
No related branches found
No related tags found
No related merge requests found
......@@ -76,15 +76,17 @@ class connection(core):
args = parser.parse_args(sys.argv[1:])
if args.version == True:
exit()
if os.path.isfile(self.configpath) == False:
self.defaultconf()
self.makeconf()
elif args.makeconf == True:
self.makeconf()
self.commands = []
self.vars = {}
if os.path.isfile(self.configpath) == False:
self.defaultconf()
self.makeconf()
self.config = ConfigParser.RawConfigParser()
self.config.read(self.configpath)
......@@ -157,9 +159,9 @@ class connection(core):
self.config.set("connection",'ns_pwd','')
self.config.set("connection",'port','6667')
self.config.add_section("users")
self.config.set("users",username,'')
self.config.set("users",'username','')
self.config.add_section("admins")
self.config.set("admins",username,'')
self.config.set("admins",'username','')
self.config.add_section("me")
self.config.set("me","char",'')
self.config.set("me","modules",'admin,web,fact,calc')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment