diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-03-12 12:58:05 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-03-12 12:58:05 +0000 |
commit | 1d86981cd7c1a00acced61c01afc536810f5aada (patch) | |
tree | 0e7e7e68b29f91540fe03e6e5bc9bf09a34a0cab /fix-shebang | |
parent | 46be3923f67a6720af65dc2e6d65ceda6199fcf6 (diff) | |
download | extrautils-1d86981cd7c1a00acced61c01afc536810f5aada.tar.gz |
Adapt to new cliapp API.
Diffstat (limited to 'fix-shebang')
-rwxr-xr-x | fix-shebang | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fix-shebang b/fix-shebang index 6d78bb0..b3b9844 100755 --- a/fix-shebang +++ b/fix-shebang @@ -23,12 +23,13 @@ import tempfile class FixShebang(cliapp.Application): def add_settings(self): - self.add_string_setting(['shebang'], 'interpreter path and args') + self.settings.add_string_setting(['shebang'], + 'interpreter path and args') def process_input(self, arg): name = self.create_tempfile_for(arg) temp = open(name, 'w') - shebang = self['shebang'] + shebang = self.settings['shebang'] if not shebang.startswith('#!'): shebang = '#!%s' % shebang temp.write('%s\n' % shebang) |