--- src/fedpkg/__main__.py | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/fedpkg/__main__.py b/src/fedpkg/__main__.py index c64f61e..4650040 100644 --- a/src/fedpkg/__main__.py +++ b/src/fedpkg/__main__.py @@ -70,6 +70,8 @@ def main(): pass except Exception, e: log.error('Could not execute %s: %s' % (client.args.command.__name__, e)) + if client.args.v: + raise sys.exit(1)
if __name__ == "__main__":
--- src/fedpkg/cli.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/fedpkg/cli.py b/src/fedpkg/cli.py index 39aed2a..0f64ca1 100644 --- a/src/fedpkg/cli.py +++ b/src/fedpkg/cli.py @@ -13,7 +13,6 @@ from pyrpkg.cli import cliClient import sys import os import logging -import getpass import re import subprocess import textwrap @@ -21,7 +20,6 @@ import hashlib
import pkgdb2client -import fedora_cert
class fedpkgClient(cliClient): @@ -81,11 +79,8 @@ class fedpkgClient(cliClient): {'user': self.cmd.user, 'module': ''})[1] branch = self.cmd.branch_merge - pkgdb = pkgdb2client.PkgDB() - username = fedora_cert.read_user_cert() - password = getpass.getpass( - "Please enter FAS password for user {0}: ".format(username)) - pkgdb.login(username, password) + pkgdb = pkgdb2client.PkgDB( + login_callback=pkgdb2client.ask_password) pkgdb.retire_packages(module_name, branch) except Exception, e: self.log.error('Could not retire package: %s' % e)
--- src/fedpkg/cli.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/fedpkg/cli.py b/src/fedpkg/cli.py index 0f64ca1..91fd34d 100644 --- a/src/fedpkg/cli.py +++ b/src/fedpkg/cli.py @@ -49,12 +49,11 @@ class fedpkgClient(cliClient): retire_parser.set_defaults(command=self.retire)
def register_update(self): - update_parser = self.subparsers.add_parser('update', - help='Submit last build as an ' - 'update', - description='This will create a \ - bodhi update request for the \ - current package n-v-r.') + update_parser = self.subparsers.add_parser( + 'update', + help='Submit last build as an update', + description='This will create a bodhi update request for the ' + 'current package n-v-r.') update_parser.set_defaults(command=self.update)
# Target functions go here @@ -142,8 +141,8 @@ suggest_reboot=False bodhi_args['bugs'] = ','.join(bugs)
# Use clog as default message - bodhi_args['descr'], bodhi_args['changelog']= \ - self._format_update_clog(clog) + bodhi_args['descr'], bodhi_args['changelog'] = \ + self._format_update_clog(clog)
template = textwrap.dedent(template) % bodhi_args
On 08/09/2014 12:31 PM, Till Maas wrote:
Can this please be merged?
Patches [PATCH 1/3] fedpkg: Show full exception if verbose [PATCH 2/3] retire: Ask for password only when required merged. Thanks!
I ran http://pypi.python.org/pypi/pep8 on *.py in fedpkg repo and fixed all reported problems except of Maximum Line Length. Because I'm lazy to fix that properly.
buildsys@lists.fedoraproject.org