Can't delete old versions in esky 0.9.8 : Python

痞子三分冷 提交于 2020-01-06 13:51:44

问题


I use esky 0.9.8 : Python.
I update my executable frequently to a new version using esky.
This works all and well besides the fact that esky doesn't erase the old version of the executable.
This is the code I use:

if getattr(sys,"frozen",False):
app = esky.Esky(sys.executable,"https://example-app.com/downloads/")
print "You are running: %s" % app.active_version
try:
    if(app.find_update() != None):
        app.auto_update()
        appexe = esky.util.appexe_from_executable(sys.executable)
        os.execv(appexe,[appexe] + sys.argv[1:])
except Exception, e:
    print "ERROR UPDATING APP:", e
app.cleanup()

Everything here works well besides the last line "app cleanup()", because it doesn't delete the old versions.
In my executables folder I have the following:

App.exe App.old.exe App.old.old.exe

and so on.

Why doesn't esky delete the old version of my Executable?


回答1:


i believe i solved this issue by calling

app.cleanup()
app.reinitialize()

please let me know if that works,

You shouldn't need to but there is also this method

app.uninstall_version(v)


来源:https://stackoverflow.com/questions/29898272/cant-delete-old-versions-in-esky-0-9-8-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!