# HG changeset patch # User Marco Fabiani # Date 1333378866 -3600 # Node ID 9d9d5a1b1d3cb3648de5f519630371ca9116a0d8 # Parent 79d0f6e27371edfb501a774fd2d83015aafc4766 Added .hgignore diff -r 79d0f6e27371 -r 9d9d5a1b1d3c .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Mon Apr 02 16:01:06 2012 +0100 @@ -0,0 +1,3 @@ +syntax: glob +re:^\.cache/c4dm\.eecs\.qmul\.ac\.uk,smdmrd-test,swordv2,servicedocument,48aa9f2607a9f6cdddd8639620add899$ +re:^\.DS_Store$ diff -r 79d0f6e27371 -r 9d9d5a1b1d3c sworduploader.py --- a/sworduploader.py Thu Mar 29 17:57:33 2012 +0100 +++ b/sworduploader.py Mon Apr 02 16:01:06 2012 +0100 @@ -183,10 +183,12 @@ payload.close() # If some of the additional arguments for author, title, date etc. have been specified, update the metadata - if type == "SimpleZip" and entry != None: + if type == "SimpleZip": + if entry is None: + entry = Entry(dcterms_title=(os.path.basename(fileslist[0]))) try: 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 - print "Additional metadata updated successfully." + print "Metadata update successfull." except: print "Server error" if temp: