diff --git a/pandoraclient b/pandoraclient index ea1fed2..45056c8 100755 --- a/pandoraclient +++ b/pandoraclient @@ -311,28 +311,34 @@ def execute_organize(): data = ox.jsonc.load(open(FILES['organize'])) remove = map(lambda x: os.path.join(volume_path, x), data['automatic']['remove']) rename = map(lambda x: map(lambda y: os.path.join(volume_path, y), x), data['automatic']['rename']) + errors = [] for path in remove: + print 'Removing "%s"' % path try: if os.path.isdir(path): os.rmdir(path) else: os.remove(path) except: - print "Could not remove '%s'" % (path) + errors.append('Could not remove "%s"' % path) for paths in rename: source = paths[0] target = paths[1] + '.pandora' + print 'Renaming "%s" to "%s"' % (source, target) try: rename_file(source, target) except IOError as error: - print "Could not rename '%s' to '%s' (%s)" % (source, target, error) + errors.append('Could not rename "%s" to "%s" (%s)' % (source, target, error)) for paths in rename: source = paths[1] + '.pandora' target = paths[1] + print 'Renaming "%s" to "%s"' % (source, target) try: rename_file(source, target) except IOError as error: - print "Could not rename '%s' to '%s' (%s)" % (source, target, error) + errors.append('Could not rename "%s" to "%s" (%s)' % (source, target, error)) + for error in errors: + print error def sync():