Skip to content

Commit

Permalink
much improved use of MoveFileTransacted and friends.
Browse files Browse the repository at this point in the history
Turns out I was letting a lot of errors silently pass, meaning
transactional operations would appear to work but then silently fail
when calling commit().

Also refactored to allow use of the fallback implementation when
transactions are offered by the OS but not supported by the target
filesystem.
  • Loading branch information
rfk committed Aug 10, 2010
1 parent 544c121 commit 3236efc
Show file tree
Hide file tree
Showing 7 changed files with 473 additions and 311 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

v0.8.5:

* FSTransaction: better error handling, and better detection of cases
where native transactions will fail (e.g. on a FAT32 USB device).
* FSTransaction: accept an optional "root" parameter, and enforce all
operations to be inside this root.
* bdist_esky: accept wider variety of objects for bootstrap_code option
and Executable.script attribute. Lists are concatenated, source is
obtained using inspect.getsource().
Expand Down
4 changes: 2 additions & 2 deletions esky/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ def install_version(self,version):
try:
if not os.path.exists(target):
os.rename(source,target)
trn = esky.fstransact.FSTransaction()
trn = esky.fstransact.FSTransaction(self.appdir)
try:
self._unpack_bootstrap_env(version,trn)
except Exception:
Expand Down Expand Up @@ -878,7 +878,7 @@ def uninstall_version(self,version):
# Clean up the bootstrapping environment in a transaction.
# This might fail on windows if the version is locked.
try:
trn = esky.fstransact.FSTransaction()
trn = esky.fstransact.FSTransaction(self.appdir)
try:
self._cleanup_bootstrap_env(version,trn)
except Exception:
Expand Down
309 changes: 0 additions & 309 deletions esky/fstransact.py

This file was deleted.

Loading

0 comments on commit 3236efc

Please sign in to comment.