| |
@@ -57,19 +57,19 @@
|
| |
for url in self.URLS:
|
| |
try:
|
| |
stream = urlopen(url)
|
| |
- content = stream.read()
|
| |
+ content = stream.read().decode('utf-8')
|
| |
stream.close()
|
| |
except IOError as err:
|
| |
self.log.warning("Could not retrieve info from %s", url)
|
| |
self.log.debug("Error: %s", err, exc_info=True)
|
| |
continue
|
| |
- res = re.search(("Package: %s\nVersion:.*" % name).encode(), content)
|
| |
+ res = re.search(("Package: %s\nVersion:.*" % name), content)
|
| |
if res is not None:
|
| |
self.log.debug("Found in: %s", url)
|
| |
versionok.append(url)
|
| |
if version is None:
|
| |
- ver = res.group().split(b"\n")[1]
|
| |
- version = ver.replace(b"Version:", b"").strip()
|
| |
+ ver = res.group().split("\n")[1]
|
| |
+ version = ver.replace("Version:", "").strip()
|
| |
else:
|
| |
self.log.warning(
|
| |
" * Found two version of the package in %s", " ".join(versionok)
|
| |
Fix #366.
Signed-off-by: Robert-André Mauchin zebob.m@gmail.com