From 84ee9c7afb7aaf5fc72f3ea2058de512cd1a4f69 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 5 Jul 2016 23:22:03 +0100 Subject: Add missing return values in boolean functions. --- poezio/roster.py | 6 +++--- poezio/windows/inputs.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poezio/roster.py b/poezio/roster.py index 15b3b01c..ac8012cb 100644 --- a/poezio/roster.py +++ b/poezio/roster.py @@ -238,16 +238,16 @@ class Roster(object): def export(self, path): """Export a list of bare jids to a given file""" if p.isfile(path): - return + return False try: f = open(path, 'w+', encoding='utf-8') f.writelines([str(i) + "\n" for i in self.contacts if self[i] and (self[i].subscription == "both" or self[i].ask)]) f.close() return True except IOError: - return + return False except OSError: - return + return False def exists(self, contact): if not contact: diff --git a/poezio/windows/inputs.py b/poezio/windows/inputs.py index a48ee84f..53925f3b 100644 --- a/poezio/windows/inputs.py +++ b/poezio/windows/inputs.py @@ -238,7 +238,7 @@ class Input(Win): """ self.reset_completion() if self.pos == 0: - return + return False self.key_left() self.key_dc() return True -- cgit v1.2.3