From d50eb092a79ded823d0a9b8b8fb18af92c554c36 Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Sat, 28 Mar 2020 15:40:49 +0100 Subject: Fixed contribfinder for python3 --- modules/contribfinder.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules') 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: %s
e-mail: %s@mageia.org' % (self.contributor,self.contributor,self.contributor,self.contributor) else: outstr = '' -- cgit v1.2.1