mirror of
https://github.com/nims11/IPod-Shuffle-4g.git
synced 2025-12-07 16:08:00 +09:00
Catch 'no space left' error #30
This commit is contained in:
parent
48909db089
commit
c0c676c05d
1 changed files with 7 additions and 1 deletions
|
|
@ -628,7 +628,13 @@ class Shuffler(object):
|
||||||
|
|
||||||
def write_database(self):
|
def write_database(self):
|
||||||
with open(os.path.join(self.path, "iPod_Control", "iTunes", "iTunesSD"), "wb") as f:
|
with open(os.path.join(self.path, "iPod_Control", "iTunes", "iTunesSD"), "wb") as f:
|
||||||
f.write(self.tunessd.construct())
|
try:
|
||||||
|
f.write(self.tunessd.construct())
|
||||||
|
except IOError as e:
|
||||||
|
print "I/O error({0}): {1}".format(e.errno, e.strerror)
|
||||||
|
print "Error: Writing iPod database failed."
|
||||||
|
sys.exit(1)
|
||||||
|
print "Database written sucessful."
|
||||||
|
|
||||||
#
|
#
|
||||||
# Read all files from the directory
|
# Read all files from the directory
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue