missing file.close()

This commit is contained in:
Haiming Zhang 2015-03-05 19:12:07 +00:00
parent 4579a696e8
commit aeb468254d
1 changed files with 2 additions and 1 deletions

View File

@ -212,7 +212,7 @@ Transform linear binned data into Euler angles.
parser.add_option('-f', '--file', dest='file', type='string', metavar = 'string', \
help='file name, the input file is generated by the script "OIMlinear2linearODF.py"')
parser.add_option('-o', '--output', dest='output', type='string', metavar = 'string', \
help='the prefix of output file name.')
help='the prefix of output files name.')
parser.add_option('-n', '--number', dest='number', type='int', metavar = 'int', \
help='the number of orientations needed to be generated, the default is [%default]')
parser.add_option('-a','--algorithm', dest='algorithm', type='string', metavar = 'string', \
@ -385,5 +385,6 @@ for method in methods:
fileConfig.write('[Grain%s]\n'%(str(ID).zfill(formatwidth)) + \
'(gauss) phi1 %10.5f Phi %10.5f phi2 %10.6f scatter 0.0 fraction 1.0\n'\
%(float(eulers[0]),float(eulers[1]),float(eulers[2])))
fileConfig.close()
except:
print 'unable to write material .config file:', nameSampledODF+'.'+method+str(nSamples)+'.config'