コード例 #1
0
ファイル: imports.py プロジェクト: JanDeVisser/sweattrails
 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)
コード例 #2
0
ファイル: imports.py プロジェクト: JanDeVisser/Grumble
 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)
コード例 #3
0
 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)
コード例 #4
0
ファイル: sqlite.py プロジェクト: JanDeVisser/Grumble
 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)