mirror of
https://github.com/erkin/ponysay
synced 2024-11-16 08:27:58 +00:00
derp
This commit is contained in:
parent
49e7ad42eb
commit
8ac0aceadc
1 changed files with 7 additions and 2 deletions
9
ponysay
9
ponysay
|
@ -570,8 +570,13 @@ class Ponysay():
|
|||
if cachev is not None:
|
||||
cachev.close()
|
||||
if newversion:
|
||||
for cached in os.listdir(ponydir):
|
||||
shutil.rmtree(cachedir + '/' + cached, False)
|
||||
for cached in os.listdir(cachedir):
|
||||
cached = cachedir + '/' + cached
|
||||
if os.path.isdir(cached) and not os.path.islink(cached):
|
||||
shutil.rmtree(cached, False)
|
||||
else:
|
||||
os.remove(cached)
|
||||
cachev = None
|
||||
try:
|
||||
cachev = open(cachedir + '/.version', 'w+')
|
||||
cachev.write(KMS_VERSION)
|
||||
|
|
Loading…
Reference in a new issue