From e0006b8da257a7dd4efd24aceb5972f4d1781936 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 5 May 2013 07:57:37 +0100 Subject: Remove whitespace from end of lines --- clab | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clab b/clab index daa2dbc..26ada94 100755 --- a/clab +++ b/clab @@ -1,17 +1,17 @@ #!/usr/bin/python # # Copyright 2013 Lars Wirzenius -# +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . @@ -28,7 +28,7 @@ class Entry(object): def __init__(self, parsed_yaml): assert type(parsed_yaml) is dict, repr(parsed_yaml) self._dict = parsed_yaml - + def as_yaml(self): return yaml.safe_dump(self._dict, default_flow_style=False) @@ -38,7 +38,7 @@ class Entry(object): return default keys = sorted(names.keys()) return names[keys[0]] - + def get_subdict(self, key): if key in self._dict: v = self._dict[key] @@ -52,14 +52,14 @@ class AddressBook(object): def __init__(self): self.entries = [] - + def find_yaml_files(self, database_root): for dirname, subdirs, basenames in os.walk(database_root): subdirs.sort() for basename in sorted(basenames): if basename.endswith('.yaml'): yield os.path.join(dirname, basename) - + def add_from_database(self, database_root): logging.info('Adding from database %s' % database_root) for yaml_filename in self.find_yaml_files(database_root): -- cgit v1.2.1