3
0
mirror of https://git.launchpad.net/ubuntu-dev-tools synced 2025-03-13 08:01:09 +00:00
2011-09-06 13:11:42 +02:00

52 lines
1.3 KiB
Python
Executable File

#!/usr/bin/python
# Copyright (C) 2011 Canonical Ltd., Daniel Holbach
#
# ##################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# See file /usr/share/common-licenses/GPL-3 for more details.
#
# ##################################################################
#
#
# harvest - grabs information about development opportunities from
# harvest.ubuntu.com
#
#
# Daniel Holbach
# (c) 2011 Canonical
from optparse import OptionParser
import sys
from devscripts.logger import Logger
from ubuntutools.harvest import Harvest
def main():
usage = "usage: %prog source-package-name"
opt_parser = OptionParser(usage)
args = opt_parser.parse_args()[1]
if len(args) != 1:
opt_parser.print_help()
sys.exit(1)
pkg = args[0].strip()
print Harvest(pkg).report()
if __name__ == '__main__':
try:
main()
except KeyboardInterrupt:
Logger.error("Aborted.")
sys.exit(1)