Commit d7536560 authored by Nathaniel Case's avatar Nathaniel Case

Use open() instead of file()

parent 538e6025
......@@ -100,7 +100,7 @@ class PyrasiteIPC(object):
(fd, filename) = tempfile.mkstemp()
tmp = os.fdopen(fd, 'w')
path = dirname(abspath(join(pyrasite.__file__, '..')))
payload = file(join(path, 'pyrasite', 'reverse.py'))
payload = open(join(path, 'pyrasite', 'reverse.py'))
tmp.write('import sys; sys.path.insert(0, "%s")\n' % path)
for line in payload.readlines():
......
......@@ -450,10 +450,10 @@ class PyrasiteWindow(Gtk.Window):
def inject_js(self):
log.debug("Injecting jQuery")
js = join(dirname(abspath(__file__)), 'js')
jquery = file(join(js, 'jquery-1.7.1.min.js'))
jquery = open(join(js, 'jquery-1.7.1.min.js'))
self.info_view.execute_script(jquery.read())
jquery.close()
sparkline = file(join(js, 'jquery.sparkline.min.js'))
sparkline = open(join(js, 'jquery.sparkline.min.js'))
self.info_view.execute_script(sparkline.read())
sparkline.close()
......@@ -638,7 +638,7 @@ class PyrasiteWindow(Gtk.Window):
payloads = os.path.join(os.path.abspath(os.path.dirname(
pyrasite.__file__)), 'payloads')
dump_stacks = os.path.join(payloads, 'dump_stacks.py')
code = proc.cmd(file(dump_stacks).read())
code = proc.cmd(open(dump_stacks).read())
self.update_progress(0.6)
self.source_buffer.set_text('')
......
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