Il lancio di tanti thread concorrenti fa casino, il numero incrementale
del file non viene resettato per ogni thread (inspiegabile)
This commit is contained in:
@@ -51,6 +51,7 @@ class bananaSPLITTER(threading.Thread):
|
||||
except UnicodeDecodeError as ee:
|
||||
self.log.critical("Il file [{}] contiene caratteri non compatibili con la codifica scelta! [{}]"
|
||||
.format(self.fileParams['name'],ee))
|
||||
os.rmdir(self.outPath)
|
||||
pass
|
||||
|
||||
def openFile(self):
|
||||
@@ -63,6 +64,7 @@ class bananaSPLITTER(threading.Thread):
|
||||
except IOError as e:
|
||||
self.log.critical("Impossibile aprire il file: {}! [{}]".format(self.fileName,e))
|
||||
raise BaseException("OpenFile")
|
||||
os.rmdir(self.outPath)
|
||||
pass
|
||||
|
||||
def remEmptyLines(self):
|
||||
|
||||
@@ -26,6 +26,8 @@ if __name__ == "__main__":
|
||||
splitter = bananaSPLITTER(fileParams=deepcopy(splconf), logger=logger)
|
||||
splist.append(splitter)
|
||||
splitter.start()
|
||||
splitter.join()
|
||||
|
||||
|
||||
logger.info("\n"+"="*50+"\n\tFINITO!!!\n"+"="*50)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user