aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2020-03-28 15:40:49 +0100
committerAngelo Naselli <anaselli@linux.it>2020-03-28 15:40:49 +0100
commitd50eb092a79ded823d0a9b8b8fb18af92c554c36 (patch)
tree922edddf25abb6402449ec22f03832d40a91fef8 /modules
parent28e91224eb01ea21b44cd00a16c3018bcb463df7 (diff)
downloadmanatools-d50eb092a79ded823d0a9b8b8fb18af92c554c36.tar
manatools-d50eb092a79ded823d0a9b8b8fb18af92c554c36.tar.gz
manatools-d50eb092a79ded823d0a9b8b8fb18af92c554c36.tar.bz2
manatools-d50eb092a79ded823d0a9b8b8fb18af92c554c36.tar.xz
manatools-d50eb092a79ded823d0a9b8b8fb18af92c554c36.zip
Fixed contribfinder for python3
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/contribfinder.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/contribfinder.py b/modules/contribfinder.py
index bfe06b3c..3eb82317 100755
--- a/modules/contribfinder.py
+++ b/modules/contribfinder.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# vim: set et ts=4 sw=4:
#coding:utf-8
#############################################################################
@@ -79,7 +79,8 @@ class mainGui():
resp, content = h.request(dlurl, 'GET')
if resp.status != 200:
raise Exception('Package cannot be found in maintdb')
- retoutput = content.rstrip('\n')
+ str_content = content.decode('utf-8')
+ retoutput = str_content.rstrip('\n')
except:
retoutput = "No contributors found"
return retoutput
@@ -97,7 +98,7 @@ class mainGui():
self.dialog.destroy()
break
if event.widget() == self.btnLookAtIt:
- if(cmp(self.contributor.strip(),"")!=0):
+ if(self.contributor.strip()):
url = 'http://people.mageia.org/u/%s.html' % self.contributor
os.system("www-browser %s" % url)
if event.widget() == self.btnsearch:
@@ -105,7 +106,7 @@ class mainGui():
#self.rtinformations.setValue("Loading...")
#self.dialog.doneMultipleChanges()
self.contributor = self.stripErrMessages(self.queryMaintDB(self.txtpkgname.value()))
- if(cmp(self.contributor.strip(),"")!=0):
+ if(self.contributor.strip()):
outstr = 'Maintainer:&nbsp;<a href="http://people.mageia.org/u/%s.html">%s</a><br />e-mail:&nbsp;<a href="mailto:%s@mageia.org">%s@mageia.org</a>' % (self.contributor,self.contributor,self.contributor,self.contributor)
else:
outstr = ''