don't throw error if we can't return to old folder

This commit is contained in:
Damien Elmes 2012-09-03 05:02:54 +09:00
parent fa4f26e560
commit 1db6a0bd3a

View file

@ -55,7 +55,11 @@ class MediaManager(object):
self.db = None
# change cwd back to old location
if self._oldcwd:
os.chdir(self._oldcwd)
try:
os.chdir(self._oldcwd)
except:
# may have been deleted
pass
def dir(self):
return self._dir