summaryrefslogtreecommitdiff
path: root/scripts/spdxcheck.py
diff options
context:
space:
mode:
authorJames Morris <james.morris@microsoft.com>2018-12-17 11:24:28 -0800
committerJames Morris <james.morris@microsoft.com>2018-12-17 11:24:28 -0800
commit8bd8ea195f6d135a8d85201116314eb5237ad7e7 (patch)
tree3ef99e468f0b4b13cc11002aa60c4451e326191b /scripts/spdxcheck.py
parent1072bd678547f8663cfb81a22fdb50c589e4976e (diff)
parent7566ec393f4161572ba6f11ad5171fd5d59b0fbd (diff)
Merge tag 'v4.20-rc7' into next-general
Sync with Linux 4.20-rc7, to pick up: Revert "ovl: relax permission checking on underlying layers"
Diffstat (limited to 'scripts/spdxcheck.py')
-rwxr-xr-xscripts/spdxcheck.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
index 839e190bbd7a..e559c6294c39 100755
--- a/scripts/spdxcheck.py
+++ b/scripts/spdxcheck.py
@@ -250,12 +250,13 @@ if __name__ == '__main__':
try:
if len(args.path) and args.path[0] == '-':
- parser.parse_lines(sys.stdin, args.maxlines, '-')
+ stdin = os.fdopen(sys.stdin.fileno(), 'rb')
+ parser.parse_lines(stdin, args.maxlines, '-')
else:
if args.path:
for p in args.path:
if os.path.isfile(p):
- parser.parse_lines(open(p), args.maxlines, p)
+ parser.parse_lines(open(p, 'rb'), args.maxlines, p)
elif os.path.isdir(p):
scan_git_subtree(repo.head.reference.commit.tree, p)
else: