[Rivet-svn] r2142 - trunk/bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Dec 7 16:32:23 GMT 2009


Author: hoeth
Date: Mon Dec  7 16:32:23 2009
New Revision: 2142

Log:
Fix in gap_removal for missing XLabel/YLabel.

Modified:
   trunk/bin/gap_removal

Modified: trunk/bin/gap_removal
==============================================================================
--- trunk/bin/gap_removal	Mon Dec  7 15:43:53 2009	(r2141)
+++ trunk/bin/gap_removal	Mon Dec  7 16:32:23 2009	(r2142)
@@ -51,8 +51,14 @@
     def write_datapointset_header(self, f):
             path  = self.description['AidaPath']
             title = self.description['Title'].replace('>', '&gt;').replace('<', '&lt;').replace('"', '&quot;')
-            xlabel = self.description['XLabel'].replace('>', '&gt;').replace('<', '&lt;').replace('"', '&quot;')
-            ylabel = self.description['YLabel'].replace('>', '&gt;').replace('<', '&lt;').replace('"', '&quot;')
+            try:
+                xlabel = self.description['XLabel'].replace('>', '&gt;').replace('<', '&lt;').replace('"', '&quot;')
+            except:
+                xlabel = ''
+            try:
+                ylabel = self.description['YLabel'].replace('>', '&gt;').replace('<', '&lt;').replace('"', '&quot;')
+            except:
+                ylabel = ''
             f.write('  <dataPointSet name="%s" dimension="2"\n' % path.split('/')[-1])
             f.write('  path="%s" title="%s">\n' %(os.path.abspath(path.replace(path.split('/')[-1], '')), title))
             f.write('    <annotation>\n')


More information about the Rivet-svn mailing list