0

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?

AlG
  • 14,697
  • 4
  • 41
  • 54
yuval
  • 2,848
  • 4
  • 31
  • 51

1 Answers1

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)
timeyyy
  • 654
  • 9
  • 20
  • what does app.reinitialize() do? i didn't quite understand what it does from the documentation – yuval Jun 21 '15 at 13:15
  • i'm not sure exactly what it does, did it fix the problem? – timeyyy Jun 21 '15 at 15:19
  • Its gonna take some time to check this problem because it doesn't happen on every pc. Could you help me with the other post too? It is a bit similiar but it's not entirely identitical. This post is about cleanup and the other is about uninstall. – yuval Jun 21 '15 at 17:50
  • i'm assuming you are trying to use the uninstall_version() because cleanup() is failing, it makes it easy for other people to find a relevant answer to the same problem if all of the follow up is in the same place. As for the uninstall_version raising a permission error, try running the program as an admin and if it runs it means esky is having trouble getting admin access. Unfortunately this is a bug in esky, see here http://stackoverflow.com/questions/12153285/esky-freezes-after-escalating-permissions-on-windows-7/30922710#30922710, if you'd like to help solve the problem feel free :) – timeyyy Jun 21 '15 at 18:35