summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/bdist_rpm.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/command/bdist_rpm.py')
-rw-r--r--Lib/distutils/command/bdist_rpm.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 02f10dd..20ca7ac 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -537,7 +537,8 @@ class bdist_rpm(Command):
'',
'%' + rpm_opt,])
if val:
- spec_file.extend(open(val, 'r').read().split('\n'))
+ with open(val) as f:
+ spec_file.extend(f.read().split('\n'))
else:
spec_file.append(default)