summaryrefslogtreecommitdiff
path: root/summain
diff options
context:
space:
mode:
Diffstat (limited to 'summain')
-rwxr-xr-xsummain10
1 files changed, 5 insertions, 5 deletions
diff --git a/summain b/summain
index c37e57c..7004882 100755
--- a/summain
+++ b/summain
@@ -25,8 +25,8 @@ import summainlib
class Summain(cliapp.Application):
def add_settings(self):
- self.add_boolean_setting(['relative-paths', 'r'],
- 'print paths relative to arguments')
+ self.settings.add_boolean_setting(['relative-paths', 'r'],
+ 'print paths relative to arguments')
def files(self, root):
if os.path.isdir(root):
@@ -38,13 +38,13 @@ class Summain(cliapp.Application):
yield root
def process_args(self, args):
- relative = self['relative-paths']
+ relative = self.settings['relative-paths']
normalizer = summainlib.NumberNormalizer()
for root in args:
for filename in self.files(root):
o = summainlib.FilesystemObject(filename, normalizer)
- sys.stdout.write(o.format(root if relative else None))
- sys.stdout.write('\n')
+ self.output.write(o.format(root if relative else None))
+ self.output.write('\n')
Summain().run()