nun hab ich das mit den arrays umgesetzt und bekomme nun folgenden Fehler:
TypeError: coercing to Unicode: need string or buffer, list found
die Zeilen die angemeckert werden sind folgende
File "C:\Python26\lib\threading.py line 532 in __bootstrap__inner self.run()
line 484 in run
self.__target
file latest.py line 281 in backup
raise e
in der file die Zeile 281 sieht so aus:
Code: Alles auswählen
print self.allexcludes
tar = None
try:
if not os.path.exists(os.path.dirname(self.current_archive)):
os.makedirs(os.path.dirname(self.current_archive))
tar = tarfile.open(self.current_archive, 'w:bz2')
for directory in self.sources:
os.path.walk(directory, self.add_file, (tar, since_date))
print >> sys.stderr,'Backup to archive "%s" complete.' % self.current_archive
except OSError:
print >> sys.stderr, '''Backup aborted because file "%s" couldn't be written.''' % self.current_archive
pass
except IOError:
print >> sys.stderr, '''Backup aborted because file "%s" couldn't be written.''' % self.current_archive
pass
except Exception, e:
if e.args == ('Stopping backup!', ):
print >> sys.stdout, 'Backup aborted as told by configuration file %s.' % self.config_file
else:
raise e
finally:
if tar != None and not tar.closed:
try:
tar.close()
except Exception, e:
pass
self.backup_thread = None
self.allexcludes wurde später definiert mit excludes
und gibt nun die richtigen Dateien aus dem array heraus.
kann mir jemand erklären warum ich nun diesen TypeError bekomme?