Commit 631bbc4c authored by André Anjos's avatar André Anjos 💬
Browse files

[scripts][changelog] Fix minor code issues

parent 4fa051ae
Pipeline #25707 failed with stages
in 8 minutes and 20 seconds
......@@ -91,8 +91,8 @@ def changelog(target, changelog, group, mode, since):
# reads package list or considers name to be a package name
if os.path.exists(target) and os.path.isfile(target):
bdt.logger.info('Reading package names from file %s...', target)
with open(target, 'rb') as f:
packages = [k.strip() for k in f.readlines() if k and not \
with open(target, 'rt') as f:
packages = [k.strip() for k in f.readlines() if k.strip() and not \
k.strip().startswith('#')]
else:
bdt.logger.info('Assuming %s is a package name (file does not ' \
......@@ -106,7 +106,7 @@ def changelog(target, changelog, group, mode, since):
for package in packages:
if '/' not in package:
package = '/'.join(group, package)
package = '/'.join((group, package))
# retrieves the gitlab package object
use_package = gl.projects.get(package)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment