version 1.2, 2009/06/21 11:12:00
|
version 1.3, 2009/06/22 10:48:35
|
Line 33 from types import *
|
Line 33 from types import *
|
import pickle |
import pickle |
import tempfile |
import tempfile |
from cdli_files import CDLIFile |
from cdli_files import CDLIFile |
|
from cdli_files import splitatf,checkFile |
from cdli_helpers import * |
from cdli_helpers import * |
|
|
class BasketContent(SimpleItem): |
class BasketContent(SimpleItem): |
"""classe fuer den Inhalt eines Baskets""" |
"""classe fuer den Inhalt eines Baskets""" |
|
|
Line 347 class uploadATFThread(Thread):
|
Line 349 class uploadATFThread(Thread):
|
|
|
#make sure that id is a string and not an integer |
#make sure that id is a string and not an integer |
basketId=str(basketId) |
basketId=str(basketId) |
|
logging.info("basketID:"+basketId) |
#TODO: make this configurable, at the moment, rootFolder for cdli has to be cdliRoot |
#TODO: make this configurable, at the moment, rootFolder for cdli has to be cdliRoot |
ctx2=ctx.cdliRoot |
ctx2=ctx.cdliRoot |
|
|
#get temporary file for staging the downloaded and splitted files |
#get temporary file for staging the downloaded and splitted files |
dir=tempfile.mkdtemp() |
dir=tempfile.mkdtemp() |
|
|
|
logging.info("tmpfFile:"+str(dir)) |
changed=[] # changed files |
changed=[] # changed files |
errors=[] # files with errors |
errors=[] # files with errors |
lockerrors=[] # files with errors |
lockerrors=[] # files with errors |
Line 363 class uploadATFThread(Thread):
|
Line 365 class uploadATFThread(Thread):
|
psNotInCatalog=[] # files not in the catalog |
psNotInCatalog=[] # files not in the catalog |
|
|
#split the uploadedd atf file |
#split the uploadedd atf file |
|
logging.info("start splitting") |
basketNameFromFile, numberOfFiles=splitatf(upload,dir,ext=self) |
basketNameFromFile, numberOfFiles=splitatf(upload,dir,ext=self) |
|
|
#find basketId if not set |
#find basketId if not set |