Make pylint a little bit happier.

This commit is contained in:
Benjamin Drung 2010-12-27 16:54:23 +01:00
parent 39e6306364
commit c19ff094b1
3 changed files with 12 additions and 3 deletions

5
dgetlp
View File

@ -234,7 +234,7 @@ def unpack():
def getHost(url):
return urllib2.splithost(urllib2.splittype(url)[1])[0]
if __name__ == "__main__":
def main():
parser = OptionParser(usage=Usage)
parser.add_option("-d", "--debug", action="store_true", dest="debug",
default=False, help="Enable debugging")
@ -320,3 +320,6 @@ if __name__ == "__main__":
status("Unpacking")
unpack()
if __name__ == "__main__":
main()

View File

@ -252,7 +252,7 @@ def deb_cmp(x, y):
return 0
if __name__ == '__main__':
def main():
if len(sys.argv) > 1 and sys.argv[1] in ('-h', '--help'):
usage(exit=0)
if len(sys.argv) != 3:
@ -263,3 +263,6 @@ if __name__ == '__main__':
merge_changelog(left_changelog, right_changelog)
sys.exit(0)
if __name__ == '__main__':
main()

View File

@ -41,7 +41,7 @@ from ubuntutools.requestsync.common import (edit_report, getDebianChangelog,
# entry point
#
if __name__ == '__main__':
def main():
# Our usage options.
usage = ('Usage: %prog [options] '
'<source package> [<target release> [base version]]')
@ -293,3 +293,6 @@ if __name__ == '__main__':
mailBug(srcpkg, subscribe, status, title, report, options.lpinstance,
options.keyid, email_from, mailserver_host, mailserver_port,
mailserver_user, mailserver_pass)
if __name__ == '__main__':
main()