Kaydet (Commit) 7adc94c6 authored tarafından Faik Uygur's avatar Faik Uygur

prone to mistakes

üst 9077c8b3
......@@ -272,8 +272,12 @@ def clearCache(cacheDir, limit):
pass
def removeAll(cacheDir):
import shutil
shutil.rmtree(cacheDir, True)
cached = glob.glob("%s/*.pisi" % cacheDir) + glob.glob("%s/*.part" % cacheDir)
for pkg in cached:
try:
os.remove(pkg)
except exceptions.OSError:
pass
limit = int(limit)
pkgList = map(lambda x: os.path.basename(x).split(".pisi")[0], glob.glob("%s/*.pisi" % cacheDir))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment