[openrtm-commit:01317] r593 - trunk/OpenRTM-aist-Python
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 2月 25日 (火) 21:43:41 JST
Author: ga
Date: 2014-02-25 21:43:41 +0900 (Tue, 25 Feb 2014)
New Revision: 593
Modified:
trunk/OpenRTM-aist-Python/setup.py
Log:
sdist_zip bug has been fixed. refs #3032
Modified: trunk/OpenRTM-aist-Python/setup.py
===================================================================
--- trunk/OpenRTM-aist-Python/setup.py 2013-06-27 09:21:46 UTC (rev 592)
+++ trunk/OpenRTM-aist-Python/setup.py 2014-02-25 12:43:41 UTC (rev 593)
@@ -351,7 +351,8 @@
return coding
sub_str = "coding: " + coding_name(char_code)
import re
- for line in open(file_name, "r"):
+ infd = open(file_name, "r")
+ for line in infd:
try:
outdata = conv_encoding(line.rstrip('\r\n'), char_code)
outdata = re.sub("coding: [^ ]*", sub_str, outdata)
@@ -359,13 +360,15 @@
except Exception, e:
print "Exception cought in " + file_name + ": " + line
print e
+ infd.close()
outfd.close()
os.remove(temp_fname)
sys.exit(1)
outfd.write(outdata + crlf_code)
+ infd.close()
os.remove(file_name)
+ outfd.close()
os.rename(temp_fname, file_name)
- outfd.close()
#------------------------------------------------------------
# compiling IDL files
More information about the openrtm-commit
mailing list