def run(self): filename = self.options.filename if not filename: filename = os.path.join(os.path.expandvars("$HOME"), ".yokadi.db") print "Using default database (%s)" % filename connectDatabase(filename, createIfNeeded=False) # Basic tests : if not (Task.tableExists() and Config.tableExists()): print "Your database seems broken or not initialised properly. Start yokadi command line tool to do it" sys.exit(1) # Start ical http handler if self.options.icalserver: yokadiIcalServer = YokadiIcalServer(self.options.tcpPort, self.options.tcpListen) yokadiIcalServer.start() # Start the main event Loop try: while event[1] != "SIGTERM": eventLoop() event[0] = True except KeyboardInterrupt: print "\nExiting..."
def run(self): filename = self.options.filename if not filename: filename = basepaths.getDbPath() print("Using default database (%s)" % filename) db.connectDatabase(filename, createIfNeeded=False) session = db.getSession() # Basic tests : if not len(session.query(db.Config).all()) >= 1: print( "Your database seems broken or not initialised properly. Start yokadi command line tool to do it" ) sys.exit(1) # Start ical http handler if self.options.icalserver: yokadiIcalServer = YokadiIcalServer(self.options.tcpPort, self.options.tcpListen) yokadiIcalServer.start() # Start the main event Loop try: while event[1] != "SIGTERM": eventLoop() event[0] = True except KeyboardInterrupt: print("\nExiting...")
def run(self): filename = self.options.filename if not filename: filename = os.path.join(os.path.expandvars("$HOME"), ".yokadi.db") print("Using default database (%s)" % filename) db.connectDatabase(filename, createIfNeeded=False) session = db.getSession() # Basic tests : if not len(session.query(db.Config).all()) >=1: print("Your database seems broken or not initialised properly. Start yokadi command line tool to do it") sys.exit(1) # Start ical http handler if self.options.icalserver: yokadiIcalServer = YokadiIcalServer(self.options.tcpPort, self.options.tcpListen) yokadiIcalServer.start() # Start the main event Loop try: while event[1] != "SIGTERM": eventLoop() event[0] = True except KeyboardInterrupt: print("\nExiting...")
def run(self): db.connectDatabase(self.dbPath, createIfNeeded=False) print("Using %s" % self.dbPath) session = db.getSession() # Basic tests : if not len(session.query(db.Config).all()) >= 1: print("Your database seems broken or not initialised properly. Start yokadi command line tool to do it") sys.exit(1) # Start ical http handler if self.options.icalserver: yokadiIcalServer = YokadiIcalServer(self.options.tcpPort, self.options.tcpListen) yokadiIcalServer.start() # Start the main event Loop try: while event[1] != "SIGTERM": eventLoop() event[0] = True except KeyboardInterrupt: print("\nExiting...")