Commit 5f722223 authored by Yingjie Xu's avatar Yingjie Xu

Simplify file writing.

parent 3313b309
......@@ -405,9 +405,7 @@ class Partition(object):
parameter_dict = self.computer_partition.getInstanceParameterDict()
if 'timestamp' in parameter_dict:
timestamp_path = os.path.join(self.instance_path, '.timestamp')
descriptor = open(timestamp_path, 'w')
descriptor.write(parameter_dict['timestamp'])
descriptor.close()
open(timestamp_path, 'w').write(parameter_dict['timestamp'])
def start(self):
"""Asks supervisord to start the instance. If this instance is not
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment