Ebook processing - more pythonic string coercion
authorDan Scott <dscott@laurentian.ca>
Thu, 4 Oct 2012 19:08:02 +0000 (15:08 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 7 May 2013 18:58:08 +0000 (14:58 -0400)
Avoid the regurgitation of errors due to trying to add a string to an
integer

Signed-off-by: Dan Scott <dscott@laurentian.ca>
tools/ebooks/prep_ebook_records.py

index 14de27f..6908a7e 100644 (file)
@@ -494,7 +494,7 @@ def process_fields(record, options, bib_id, dup_flag):
 
     # 909
     if dup_flag:
-        dup_value = bib_id + ""
+        dup_value = str(bib_id)
         dup = pymarc.Field(tag = '909',
             indicators = [' ', ' '],
             subfields = [