def default(self): config = Configuration() if self.app.pargs.qldir is not None: config.set('dir', 'ql', os.path.expanduser(self.app.pargs.qldir)) if self.app.pargs.steamdir is not None: config.set('dir', 'steamcmd', os.path.expanduser(self.app.pargs.steamdir)) if self.app.pargs.servers is not None: config.set('config', 'servers', os.path.expanduser(self.app.pargs.servers)) if self.app.pargs.supervisor is not None: config.set('supervisor', 'supervisor', os.path.expanduser(self.app.pargs.supervisor)) if self.app.pargs.supervisorctl is not None: config.set('supervisor', 'supervisorctl', os.path.expanduser(self.app.pargs.supervisorctl)) if self.app.pargs.rcon is not None: config.set('config', 'rcon', os.path.expanduser(self.app.pargs.rcon)) config.update() data = [('QLDS dir', config.get('dir', 'ql')), ('SteamCMD dir', config.get('dir', 'steamcmd')), ('Supervisor', config.get('supervisor', 'supervisor')), ('Supervisorctl', config.get('supervisor', 'supervisorctl')), ('Servers config', config.get('config', 'servers')), ('Rcon config', config.get('config', 'rcon'))] for d in data: print('%s:\n %s' % d) print('Configuration updated')
def default(self): config = Configuration() if self.app.pargs.qldir is not None: config.set('dir', 'ql', os.path.expanduser(self.app.pargs.qldir)) if self.app.pargs.steamdir is not None: config.set('dir', 'steamcmd', os.path.expanduser(self.app.pargs.steamdir)) if self.app.pargs.servers is not None: config.set('config', 'servers', os.path.expanduser(self.app.pargs.servers)) if self.app.pargs.supervisor is not None: config.set('supervisor', 'supervisor', os.path.expanduser(self.app.pargs.supervisor)) if self.app.pargs.supervisorctl is not None: config.set('supervisor', 'supervisorctl', os.path.expanduser(self.app.pargs.supervisorctl)) if self.app.pargs.rcon is not None: config.set('config', 'rcon', os.path.expanduser(self.app.pargs.rcon)) config.update() data = [ ('QLDS dir', config.get('dir', 'ql')), ('SteamCMD dir', config.get('dir', 'steamcmd')), ('Supervisor', config.get('supervisor', 'supervisor')), ('Supervisorctl', config.get('supervisor', 'supervisorctl')), ('Servers config', config.get('config', 'servers')), ('Rcon config', config.get('config', 'rcon')) ] for d in data: print('%s:\n %s' % d) print('Configuration updated')