generic.py

changeset 21
406eb996a9cd
parent 19
4dfa28236785
child 22
a2355e871b23
--- a/generic.py	Thu Mar 20 09:16:22 2014 +0200
+++ b/generic.py	Thu Mar 20 09:17:09 2014 +0200
@@ -236,9 +236,9 @@
         
         # Add some mandatory global attributes
         input_values['Measurement_ID'] = self.info['Measurement_ID']
-        input_values['RawData_Start_Date'] = '\'%s\'' % self.info['start_time'].strftime('%Y%m%d')
-        input_values['RawData_Start_Time_UT'] = '\'%s\'' % self.info['start_time'].strftime('%H%M%S')
-        input_values['RawData_Stop_Time_UT'] = '\'%s\'' % self.info['stop_time'].strftime('%H%M%S')
+        input_values['RawData_Start_Date'] = self.info['start_time'].strftime('%Y%m%d')
+        input_values['RawData_Start_Time_UT'] = self.info['start_time'].strftime('%H%M%S')
+        input_values['RawData_Stop_Time_UT'] = self.info['stop_time'].strftime('%H%M%S')
         
         # Add some optional global attributes
         input_values['System'] = params.general_parameters['System']
@@ -258,7 +258,7 @@
         for (attrib,value) in global_att.iteritems():
             val = input_values.pop(attrib,value)
             if val: 
-                exec('f.%s = %s' % (attrib,val))
+                setattr(f, attrib, val)
         
         """ Variables """
         # Write the values of fixes channel parameters

mercurial