Fix for Travis CI

This commit is contained in:
schroeji 2015-09-25 11:15:56 +02:00
parent 675ddd8d08
commit e9835070e2

View File

@ -10,16 +10,15 @@ from i3pystatus.updates import Backend
class Yaourt(Backend): class Yaourt(Backend):
def __init__(self, aur_only = True): def __init__(self, aur_only=True):
self.aur_only = aur_only self.aur_only = aur_only
@property @property
def updates(self): def updates(self):
command = ["yaourt", "-Qua"] command = ["yaourt", "-Qua"]
checkupdates = run_through_shell(command) checkupdates = run_through_shell(command)
if(self.aur_only): if(self.aur_only):
return len( re.findall("^aur/", checkupdates.out, flags=re.M) ) return len(re.findall("^aur/", checkupdates.out, flags=re.M))
return checkupdates.out.count("\n") return checkupdates.out.count("\n")
Backend = Yaourt Backend = Yaourt