コード例 #1
0
ファイル: utility.py プロジェクト: Alwnikrotikz/lh-abc
 def MoveOldFiles(self):            
     oldpath = self.getPath()
     newpath = self.getConfigPath()
     files = ["torrent.list",
              "lh.conf",
              "maker.conf",
              "search.conf",
              "torrent"]
     for name in files:
         oldname = os.path.join(oldpath, name)
         if existsAndIsReadable(oldname):
             newname = os.path.join(newpath, name)
             try:
                 move(oldname, newname)
             except:
                 pass
コード例 #2
0
ファイル: utility.py プロジェクト: Alwnikrotikz/lh-abc
 def getSharePath(self):
     path = os.path.join(sys.prefix, 'share', 'lh-abc')
     if not existsAndIsReadable(path):
         path = self.getPath()
     return path