diff options
Diffstat (limited to 'gbp/scripts/rpm_ch.py')
-rwxr-xr-x | gbp/scripts/rpm_ch.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gbp/scripts/rpm_ch.py b/gbp/scripts/rpm_ch.py index e5fddb4e..b2a836aa 100755 --- a/gbp/scripts/rpm_ch.py +++ b/gbp/scripts/rpm_ch.py @@ -92,7 +92,8 @@ def load_customizations(customization_file): return customizations = {} try: - exec(compile(open(customization_file, "rb").read(), customization_file, 'exec'), customizations, customizations) + with open(customization_file) as f: + exec(f.read(), customizations, customizations) except Exception as err: raise GbpError("Failed to load customization file: %s" % err) |