]> git.donarmstrong.com Git - neurodebian.git/commitdiff
Prevent duplicate trailing dots in publication titles.
authorMichael Hanke <michael.hanke@gmail.com>
Mon, 29 Nov 2010 19:13:38 +0000 (14:13 -0500)
committerMichael Hanke <michael.hanke@gmail.com>
Mon, 29 Nov 2010 19:13:38 +0000 (14:13 -0500)
neurodebian/dde.py

index e96e366af3499c8dbb1cb8b7af37fd8002d9e082..be008f9b553e42ed359dd790d711cba07d3c98ab 100755 (executable)
@@ -220,7 +220,12 @@ def import_blendstask(cfg, db, url):
 
             # Publications
             if st.has_key('Published-Title'):
-                pub = {'title': st['Published-Title']}
+                title = st['Published-Title']
+                if title[-1] == '.':
+                    # trip trailing dot -- added later
+                    pub = {'title': title[:-1]}
+                else:
+                    pub = {'title': title}
                 if st.has_key('Published-Authors'):
                     pub['authors'] = st['Published-Authors']
                 if st.has_key('Published-Year'):