summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2020-02-05 16:58:26 +0100
committerKarolin Seeger <kseeger@samba.org>2020-02-25 21:10:14 +0000
commitea1e73c2281ea3e7849fd30002c42d858b19b968 (patch)
treebdcd463ae071a605554fd076fe9212233fb979ea
parent370278fca390c2cdbd4fe523a27208bfa094a81a (diff)
downloadsamba-ea1e73c2281ea3e7849fd30002c42d858b19b968.tar.gz
wafsamba: Do not use 'rU' as the 'U' is deprecated in Python 3.9
See https://docs.python.org/3.9/whatsnew/3.9.html#changes-in-the-python-api "open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' (“universal newline”) in the file mode. This flag was deprecated since Python 3.3. In Python 3, the “universal newline” is used by default when a file is open in text mode. The newline parameter of open() controls how universal newlines works." BUG: https://bugzilla.samba.org/show_bug.cgi?id=14266 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Feb 6 07:30:13 UTC 2020 on sn-devel-184 (cherry picked from commit 52722746a5eb40c309ba59f78bd8e3d897417bdc)
-rw-r--r--buildtools/wafsamba/samba_utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index ad97de1859b..be022adc8f5 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -700,7 +700,7 @@ def PROCESS_SEPARATE_RULE(self, rule):
cache[node] = True
self.pre_recurse(node)
try:
- function_code = node.read('rU', None)
+ function_code = node.read('r', None)
exec(compile(function_code, node.abspath(), 'exec'), self.exec_dict)
finally:
self.post_recurse(node)