Mercurial > hg > sworduploader
comparison sworduploader.py @ 7:9d9d5a1b1d3c
Added .hgignore
author | Marco Fabiani <marco.fabiani@eecs.qmul.ac.uk> |
---|---|
date | Mon, 02 Apr 2012 16:01:06 +0100 |
parents | 79d0f6e27371 |
children | ff51b8204ad4 |
comparison
equal
deleted
inserted
replaced
6:79d0f6e27371 | 7:9d9d5a1b1d3c |
---|---|
181 if type == "METS": # Just guessing: not sure this is the problem... | 181 if type == "METS": # Just guessing: not sure this is the problem... |
182 print "To submit a METS package, the collection MUST have a workflow!" | 182 print "To submit a METS package, the collection MUST have a workflow!" |
183 payload.close() | 183 payload.close() |
184 | 184 |
185 # If some of the additional arguments for author, title, date etc. have been specified, update the metadata | 185 # If some of the additional arguments for author, title, date etc. have been specified, update the metadata |
186 if type == "SimpleZip" and entry != None: | 186 if type == "SimpleZip": |
187 if entry is None: | |
188 entry = Entry(dcterms_title=(os.path.basename(fileslist[0]))) | |
187 try: | 189 try: |
188 receipt_update = c.update(dr = receipt_dep , metadata_entry = entry, in_progress = True) # in_progress is True: we don't want to close the submission | 190 receipt_update = c.update(dr = receipt_dep , metadata_entry = entry, in_progress = True) # in_progress is True: we don't want to close the submission |
189 print "Additional metadata updated successfully." | 191 print "Metadata update successfull." |
190 except: | 192 except: |
191 print "Server error" | 193 print "Server error" |
192 if temp: | 194 if temp: |
193 os.remove(fileslist[0]) | 195 os.remove(fileslist[0]) |
194 | 196 |