diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-06-05 16:22:06 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-06-05 16:22:06 +0100 |
commit | 6431d9e8311abee7a76ddcc08d10c9f8110ce121 (patch) | |
tree | 2dac335997982236fe5e0d0b02e90331677a2a74 | |
parent | e9ae45153435205277fe7a43574ac11735d75909 (diff) | |
download | unperish-6431d9e8311abee7a76ddcc08d10c9f8110ce121.tar.gz |
Initialize self.debian_control and self.debian_changelog for each subcommand.
-rwxr-xr-x | unperish | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -52,20 +52,20 @@ class Unperish(cliapp.Application): self.autofill_meta() self.read_meta() - try: - with open(self.join(self.dirname, 'debian', 'control')) as f: - self.debian_control = debian.deb822.Deb822(f) - except IOError: - pass - - try: - with open(self.join(self.dirname, 'debian', 'changelog')) as f: - self.debian_changelog = debian.changelog.Changelog(f) - except IOError: - pass - cmd_methods = self._subcommands() for arg in args: + try: + with open(self.join(self.dirname, 'debian', 'control')) as f: + self.debian_control = debian.deb822.Deb822(f) + except IOError: + pass + + try: + with open(self.join(self.dirname, 'debian', 'changelog')) as f: + self.debian_changelog = debian.changelog.Changelog(f) + except IOError: + pass + method = self._normalize_cmd(arg) if method in cmd_methods: if self.settings['verbose']: |