def _setuser(self): # FIXME - gripe should read from the session, which qt.app.SweatTrails # should manage user = QCoreApplication.instance().user if user != self.user: self.user = user user_dir = gripe.user_dir(user.uid()) self.inbox = os.path.join(user_dir, "inbox") gripe.mkdir(self.inbox) self.queue = os.path.join(user_dir, "queue") gripe.mkdir(self.queue) self.done = os.path.join(user_dir, "done") gripe.mkdir(self.done) self.rejected = os.path.join(user_dir, "rejected") gripe.mkdir(self.rejected)
def _setuser(self): # FIXME - gripe should read from the session, which qt.app.SweatTrails # should manage user = QCoreApplication.instance().user if user != self.user: self.user = user userdir = gripe.user_dir(user.uid()) self.inbox = os.path.join(userdir, "inbox") gripe.mkdir(self.inbox) self.queue = os.path.join(userdir, "queue") gripe.mkdir(self.queue) done = os.path.join(userdir, "done") gripe.mkdir(done)
def setup(cls, sqlite_conf): cls.config = sqlite_conf cls._dbdir = sqlite_conf.dbdir if "dbdir" in sqlite_conf else "db" if isinstance(sqlite_conf.wipe, bool) and sqlite_conf.wipe: shutil.rmtree(os.path.join(gripe.root_dir(), cls._dbdir)) gripe.mkdir(cls._dbdir)