summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-05-05 07:57:37 +0100
committerLars Wirzenius <liw@liw.fi>2013-05-05 07:57:37 +0100
commite0006b8da257a7dd4efd24aceb5972f4d1781936 (patch)
tree4928dc4d26e4e9644a911d3326291ca0b1034cf8
parent20b39287d7c06b96926d6ef6ef723067f76da262 (diff)
downloadclab-e0006b8da257a7dd4efd24aceb5972f4d1781936.tar.gz
Remove whitespace from end of lines
-rwxr-xr-xclab14
1 files 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 <http://www.gnu.org/licenses/>.
@@ -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):