if not out: # both branches have the same commits
return True, True
- for line in (l.decode() for l in out):
+ for line in (li.decode() for li in out):
if line.startswith("<"):
has_local = True
elif line.startswith(">"):
args.add(commit)
out, ret = self._git_getoutput('branch', args.args)
- for line in [l.decode() for l in out]:
+ for line in [li.decode() for li in out]:
# remove prefix '*' for current branch before comparing
line = line.replace('*', '')
if line.strip() == branch:
self.info[header] = value.strip()
# Body
try:
- self.long_desc = "".join([l.decode("utf-8", "backslashreplace") for l in body])
+ self.long_desc = "".join([li.decode("utf-8", "backslashreplace") for li in body])
except (IOError, UnicodeDecodeError) as msg:
raise GbpError("Failed to read patch header of '%s': %s" %
(self.path, msg))
([], [])
"""
added = set(new).difference(old)
- removed = [l for l in set(old).difference(new) if not l.startswith('#')]
+ removed = [li for li in set(old).difference(new) if not li.startswith('#')]
return (list(added), removed)