Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 def getSharePath(self):
     path = os.path.join(sys.prefix, 'share', 'lh-abc')
     if not existsAndIsReadable(path):
         path = self.getPath()
     return path