diff --git a/MeetBot/test.py b/MeetBot/test.py index b29a4dd..27424b7 100644 --- a/MeetBot/test.py +++ b/MeetBot/test.py @@ -38,7 +38,7 @@ class MeetBotTestCase(ChannelPluginTestCase): plugins = ('MeetBot',) def testRunMeeting(self): - test_script = file(os.path.join("test-script-2.log.txt")) + test_script = open(os.path.join("test-script-2.log.txt")) for line in test_script: # Normalize input lines somewhat. line = line.strip() diff --git a/ircmeeting/meeting.py b/ircmeeting/meeting.py index 6990735..99cb771 100644 --- a/ircmeeting/meeting.py +++ b/ircmeeting/meeting.py @@ -742,7 +742,7 @@ if __name__ == '__main__': M = Meeting(channel=channel, owner=None, filename=filename, writeRawLog=False) - for line in file(sys.argv[2]): + for line in open(sys.argv[2]): # match regular spoken lines: m = logline_re.match(line) if m: diff --git a/ircmeeting/writers.py b/ircmeeting/writers.py index e33520f..bfa2171 100644 --- a/ircmeeting/writers.py +++ b/ircmeeting/writers.py @@ -323,7 +323,7 @@ class _CSSmanager(object): # Stylesheet specified if getattr(self.M.config, 'cssEmbed_'+name, True): # external stylesheet - css = file(css_fname).read() + css = open(css_fname).read() return self._css_head%css else: # linked stylesheet diff --git a/tests/run_test.py b/tests/run_test.py index 5c99644..4dbf3a1 100644 --- a/tests/run_test.py +++ b/tests/run_test.py @@ -100,7 +100,7 @@ class MeetBotTest(unittest.TestCase): """ tmpdir = tempfile.mkdtemp(prefix='test-meetbot') try: - process_meeting(contents=file('test-script-1.log.txt').read(), + process_meeting(contents=open('test-script-1.log.txt').read(), filename=os.path.join(tmpdir, 'meeting'), dontSave=False, extraConfig={'writer_map':self.full_writer_map,