From e55766b0d98a0c1f5410478445743bd5202ae307 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Wed, 22 Sep 2010 11:29:14 +0200 Subject: [PATCH] hugdaylist, manage-credentials, massfile, merge-changelog, ubuntutools/requestsync/common.py: Some pyflakes-induced cleanup. --- debian/changelog | 2 ++ hugdaylist | 5 +---- manage-credentials | 2 +- massfile | 2 -- merge-changelog | 5 +---- ubuntutools/requestsync/common.py | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index cfb3907..2683398 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,8 @@ ubuntu-dev-tools (0.103) UNRELEASED; urgency=low [ Stefano Rivera ] * Add manpages for sponsor-patch and import-bug-from-debian. + * hugdaylist, manage-credentials, massfile, merge-changelog, + ubuntutools/requestsync/common.py: Some pyflakes-induced cleanup. -- Benjamin Drung Tue, 21 Sep 2010 23:52:46 +0200 diff --git a/hugdaylist b/hugdaylist index 52245d5..b26b2f9 100755 --- a/hugdaylist +++ b/hugdaylist @@ -29,9 +29,6 @@ # hugdaylist -n # - will only list URLs. -import os -import re -import string import sys from optparse import OptionParser @@ -99,7 +96,7 @@ def main(): product = launchpad.load(api_url) except Exception, e: x = getattr(e, "response", {}) - if response.get("status", None) == "404": + if x.get("status", None) == "404": print >> sys.stderr, "The URL at '%s' does not appear to be a valid url to a product" %url sys.exit(1) else: diff --git a/manage-credentials b/manage-credentials index 2e60de9..58c5652 100755 --- a/manage-credentials +++ b/manage-credentials @@ -23,7 +23,7 @@ import os import sys from optparse import OptionParser, make_option from launchpadlib.uris import lookup_service_root -from ubuntutools.lp.libsupport import Launchpad, translate_web_api, LEVEL +from ubuntutools.lp.libsupport import Launchpad, translate_api_web, LEVEL class CmdOptions(OptionParser): diff --git a/massfile b/massfile index d4fa88f..84ac024 100755 --- a/massfile +++ b/massfile @@ -26,8 +26,6 @@ import os import sys import email -import subprocess -import glob from ubuntutools.lp.libsupport import get_launchpad, translate_api_web, translate_web_api diff --git a/merge-changelog b/merge-changelog index 3b873b0..6564dbe 100755 --- a/merge-changelog +++ b/merge-changelog @@ -18,10 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import os, sys, re, time, logging - -from stat import * -from textwrap import fill +import sys, re def usage(): print '''Usage: merge-changelog diff --git a/ubuntutools/requestsync/common.py b/ubuntutools/requestsync/common.py index 53670e9..645cc15 100644 --- a/ubuntutools/requestsync/common.py +++ b/ubuntutools/requestsync/common.py @@ -106,7 +106,7 @@ def edit_report(subject, body, changes_required = False): # Launch editor try: - editor = subprocess.check_call(['sensible-editor', report_file.name]) + subprocess.check_call(['sensible-editor', report_file.name]) except subprocess.CalledProcessError, e: print >> sys.stderr, 'Error calling sensible-editor: %s\nAborting.' % e sys.exit(1)