Bug 805635: making sure we close the file on import_script; r=mdas

This commit is contained in:
David Burns 2012-10-26 16:23:52 +01:00
parent af30dc2b46
commit 37b7d7dbc2

View File

@ -456,9 +456,10 @@ class Marionette(object):
def get_perf_data(self):
return self._send_message('getPerfData', 'value')
def import_script(self, file):
f = open(file, "r")
js = f.read()
def import_script(self, js_file):
js = ''
with open(js_file, 'r') as f:
js = f.read()
return self._send_message('importScript', 'ok', script=js)
@property