diff options
| author | Craig Rodrigues <rodrigc@FreeBSD.org> | 2017-03-11 11:51:29 (GMT) |
|---|---|---|
| committer | Craig Rodrigues <rodrigc@FreeBSD.org> | 2017-03-11 11:51:29 (GMT) |
| commit | e1aa8d2b2d64eb147cedc24016c38f209d9d397f (patch) | |
| tree | d3f10cbdd1b20e7e881585dead0f7f3fa7512edd /src | |
| parent | 055c8046afce036fdfad4bc8d60e4059da148f7d (diff) | |
| download | SCons-e1aa8d2b2d64eb147cedc24016c38f209d9d397f.zip SCons-e1aa8d2b2d64eb147cedc24016c38f209d9d397f.tar.gz SCons-e1aa8d2b2d64eb147cedc24016c38f209d9d397f.tar.bz2 | |
Remove 'U' flag to open() which is deprecated.
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/SCons/Variables/VariablesTests.py | 2 | ||||
| -rw-r--r-- | src/engine/SCons/Variables/__init__.py | 2 | ||||
| -rw-r--r-- | src/script/scons-time.py | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/engine/SCons/Variables/VariablesTests.py b/src/engine/SCons/Variables/VariablesTests.py index 69f1e01..7ee66ca 100644 --- a/src/engine/SCons/Variables/VariablesTests.py +++ b/src/engine/SCons/Variables/VariablesTests.py @@ -65,7 +65,7 @@ def check(key, value, env): def checkSave(file, expected): gdict = {} ldict = {} - exec(open(file, 'rU').read(), gdict, ldict) + exec(open(file, 'r').read(), gdict, ldict) assert expected == ldict, "%s\n...not equal to...\n%s" % (expected, ldict) class VariablesTestCase(unittest.TestCase): diff --git a/src/engine/SCons/Variables/__init__.py b/src/engine/SCons/Variables/__init__.py index ce3541c..54b97a4 100644 --- a/src/engine/SCons/Variables/__init__.py +++ b/src/engine/SCons/Variables/__init__.py @@ -175,7 +175,7 @@ class Variables(object): sys.path.insert(0, dir) try: values['__name__'] = filename - exec(open(filename, 'rU').read(), {}, values) + exec(open(filename, 'r').read(), {}, values) finally: if dir: del sys.path[0] diff --git a/src/script/scons-time.py b/src/script/scons-time.py index c788e50..f12280c 100644 --- a/src/script/scons-time.py +++ b/src/script/scons-time.py @@ -814,7 +814,7 @@ class SConsTimer(object): self.title = a if self.config_file: - exec(open(self.config_file, 'rU').read(), self.__dict__) + exec(open(self.config_file, 'r').read(), self.__dict__) if self.chdir: os.chdir(self.chdir) @@ -933,7 +933,7 @@ class SConsTimer(object): self.title = a if self.config_file: - HACK_for_exec(open(self.config_file, 'rU').read(), self.__dict__) + HACK_for_exec(open(self.config_file, 'r').read(), self.__dict__) if self.chdir: os.chdir(self.chdir) @@ -1053,7 +1053,7 @@ class SConsTimer(object): object_name = args.pop(0) if self.config_file: - HACK_for_exec(open(self.config_file, 'rU').read(), self.__dict__) + HACK_for_exec(open(self.config_file, 'r').read(), self.__dict__) if self.chdir: os.chdir(self.chdir) |
