diff options
author | Pavel Raiskup <pavel@raiskup.cz> | 2013-01-20 14:51:55 +0100 |
---|---|---|
committer | Pavel Raiskup <pavel@raiskup.cz> | 2013-01-20 14:51:55 +0100 |
commit | 29876e96db9b1b13d54a8409ee5b4fb96ad02869 (patch) | |
tree | 5c8fc120ebfa45632eb9155d0785021191012998 | |
parent | a69357c1db999ce9d8a70671874b742f626496b6 (diff) | |
download | pybugz-29876e96db9b1b13d54a8409ee5b4fb96ad02869.tar.gz pybugz-29876e96db9b1b13d54a8409ee5b4fb96ad02869.tar.xz pybugz-29876e96db9b1b13d54a8409ee5b4fb96ad02869.zip |
Backport fix for passwordcmd regression
-rw-r--r-- | pybugz-0.10git69cd7-downstream.patch | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/pybugz-0.10git69cd7-downstream.patch b/pybugz-0.10git69cd7-downstream.patch index e7218fc..1fde628 100644 --- a/pybugz-0.10git69cd7-downstream.patch +++ b/pybugz-0.10git69cd7-downstream.patch @@ -1,4 +1,4 @@ -From c2181585aac4684390cd7003a6daaa4f1af7ca64 Mon Sep 17 00:00:00 2001 +From 38b5153043ee4bacf450cf4f3f62652f4789d324 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup <pavel@raiskup.cz> Date: Sun, 20 Jan 2013 10:33:59 +0100 Subject: [PATCH] Downstream patch to follow @@ -7,8 +7,8 @@ Subject: [PATCH] Downstream patch to follow --- bin/bugz | 30 +++---- bugz/argparsers.py | 12 ++- - bugz/cli.py | 212 ++++++++++++++++++++++++++++------------------ - bugz/configfile.py | 217 +++++++++++++++++++++++++++++++++--------------- + bugz/cli.py | 219 +++++++++++++++++++++++++++++------------------- + bugz/configfile.py | 217 ++++++++++++++++++++++++++++++++--------------- bugz/errhandling.py | 6 ++ bugz/log.py | 72 ++++++++++++++++ bugzrc.example | 61 -------------- @@ -18,7 +18,7 @@ Subject: [PATCH] Downstream patch to follow lbugz | 2 +- man/bugz.1 | 14 +++- setup.py | 4 + - 13 files changed, 530 insertions(+), 232 deletions(-) + 13 files changed, 534 insertions(+), 235 deletions(-) create mode 100644 bugz/errhandling.py create mode 100644 bugz/log.py delete mode 100644 bugzrc.example @@ -126,7 +126,7 @@ index 2dbdb1a..e287352 100644 help = 'output encoding (default: utf-8).') parser.add_argument('--skip-auth', diff --git a/bugz/cli.py b/bugz/cli.py -index a533da9..5075c87 100644 +index a533da9..9a84519 100644 --- a/bugz/cli.py +++ b/bugz/cli.py @@ -1,5 +1,3 @@ @@ -270,7 +270,7 @@ index a533da9..5075c87 100644 def get_input(self, prompt): return raw_input(prompt) -@@ -186,36 +217,43 @@ class PrettyBugz: +@@ -186,36 +217,44 @@ class PrettyBugz: """Authenticate a session. """ # prompt for username if we were not supplied with it @@ -283,15 +283,19 @@ index a533da9..5075c87 100644 # prompt for password if we were not supplied with it - if not self.password: -+ if not self.connection.password: - if not self.passwordcmd: +- if not self.passwordcmd: - self.log('No password given.') - self.password = getpass.getpass() ++ if not self.connection.password: ++ if not self.connection.password_cmd: + log_info('No password given.') + self.connection.password = getpass.getpass() else: - process = subprocess.Popen(self.passwordcmd.split(), shell=False, - stdout=subprocess.PIPE) +- process = subprocess.Popen(self.passwordcmd.split(), shell=False, +- stdout=subprocess.PIPE) ++ cmd = self.connection.password_cmd.split() ++ stdout = stdout=subprocess.PIPE ++ process = subprocess.Popen(cmd, shell=False, stdout=stdout) self.password, _ = process.communicate() + self.connection.password, _ = process.communicate() @@ -326,7 +330,7 @@ index a533da9..5075c87 100644 def search(self, args): """Performs a search on the bugzilla database with the keywords given on the title (or the body if specified). -@@ -245,29 +283,39 @@ class PrettyBugz: +@@ -245,29 +284,39 @@ class PrettyBugz: else: log_msg = 'Searching for bugs ' @@ -378,7 +382,7 @@ index a533da9..5075c87 100644 for bug in result['bugs']: self.showbuginfo(bug, args.attachments, args.comments) -@@ -287,7 +335,7 @@ class PrettyBugz: +@@ -287,7 +336,7 @@ class PrettyBugz: (args.description_from, e)) if not args.batch: @@ -387,7 +391,7 @@ index a533da9..5075c87 100644 # # Check all bug fields. -@@ -300,14 +348,14 @@ class PrettyBugz: +@@ -300,14 +349,14 @@ class PrettyBugz: while not args.product or len(args.product) < 1: args.product = self.get_input('Enter product: ') else: @@ -404,7 +408,7 @@ index a533da9..5075c87 100644 # check for version # FIXME: This default behaviour is not too nice. -@@ -318,14 +366,14 @@ class PrettyBugz: +@@ -318,14 +367,14 @@ class PrettyBugz: else: args.version = 'unspecified' else: @@ -421,7 +425,7 @@ index a533da9..5075c87 100644 # check for description if not args.description: -@@ -333,7 +381,7 @@ class PrettyBugz: +@@ -333,7 +382,7 @@ class PrettyBugz: if len(line): args.description = line else: @@ -430,7 +434,7 @@ index a533da9..5075c87 100644 # check for operating system if not args.op_sys: -@@ -342,7 +390,7 @@ class PrettyBugz: +@@ -342,7 +391,7 @@ class PrettyBugz: if len(line): args.op_sys = line else: @@ -439,7 +443,7 @@ index a533da9..5075c87 100644 # check for platform if not args.platform: -@@ -351,7 +399,7 @@ class PrettyBugz: +@@ -351,7 +400,7 @@ class PrettyBugz: if len(line): args.platform = line else: @@ -448,7 +452,7 @@ index a533da9..5075c87 100644 # check for default priority if args.priority is None: -@@ -360,7 +408,7 @@ class PrettyBugz: +@@ -360,7 +409,7 @@ class PrettyBugz: if len(line): args.priority = line else: @@ -457,7 +461,7 @@ index a533da9..5075c87 100644 # check for default severity if args.severity is None: -@@ -369,7 +417,7 @@ class PrettyBugz: +@@ -369,7 +418,7 @@ class PrettyBugz: if len(line): args.severity = line else: @@ -466,7 +470,7 @@ index a533da9..5075c87 100644 # check for default alias if args.alias is None: -@@ -378,7 +426,7 @@ class PrettyBugz: +@@ -378,7 +427,7 @@ class PrettyBugz: if len(line): args.alias = line else: @@ -475,7 +479,7 @@ index a533da9..5075c87 100644 # check for default assignee if args.assigned_to is None: -@@ -387,7 +435,7 @@ class PrettyBugz: +@@ -387,7 +436,7 @@ class PrettyBugz: if len(line): args.assigned_to = line else: @@ -484,7 +488,7 @@ index a533da9..5075c87 100644 # check for CC list if args.cc is None: -@@ -396,7 +444,7 @@ class PrettyBugz: +@@ -396,7 +445,7 @@ class PrettyBugz: if len(line): args.cc = line.split(', ') else: @@ -493,7 +497,7 @@ index a533da9..5075c87 100644 # fixme: groups -@@ -407,7 +455,7 @@ class PrettyBugz: +@@ -407,7 +456,7 @@ class PrettyBugz: if args.append_command is None: args.append_command = self.get_input('Append the output of the following command (leave blank for none): ') else: @@ -502,7 +506,7 @@ index a533da9..5075c87 100644 # raise an exception if mandatory fields are not specified. if args.product is None: -@@ -454,7 +502,7 @@ class PrettyBugz: +@@ -454,7 +503,7 @@ class PrettyBugz: if len(confirm) < 1: confirm = args.default_confirm if confirm[0] not in ('y', 'Y'): @@ -511,7 +515,7 @@ index a533da9..5075c87 100644 return params={} -@@ -480,7 +528,7 @@ class PrettyBugz: +@@ -480,7 +529,7 @@ class PrettyBugz: params['cc'] = args.cc result = self.bzcall(self.bz.Bug.create, params) @@ -520,7 +524,7 @@ index a533da9..5075c87 100644 def modify(self, args): """Modify an existing bug (eg. adding a comment or changing resolution.)""" -@@ -586,16 +634,16 @@ class PrettyBugz: +@@ -586,16 +635,16 @@ class PrettyBugz: for bug in result['bugs']: changes = bug['changes'] if not len(changes): @@ -542,7 +546,7 @@ index a533da9..5075c87 100644 params = {} params['attachment_ids'] = [args.attachid] -@@ -603,7 +651,7 @@ class PrettyBugz: +@@ -603,7 +652,7 @@ class PrettyBugz: result = result['attachments'][args.attachid] action = {True:'Viewing', False:'Saving'} @@ -551,7 +555,7 @@ index a533da9..5075c87 100644 (action[args.view], result['file_name'])) safe_filename = os.path.basename(re.sub(r'\.\.', '', result['file_name'])) -@@ -653,7 +701,7 @@ class PrettyBugz: +@@ -653,7 +702,7 @@ class PrettyBugz: params['comment'] = comment params['is_patch'] = is_patch result = self.bzcall(self.bz.Bug.add_attachment, params) @@ -560,7 +564,7 @@ index a533da9..5075c87 100644 def listbugs(self, buglist, show_status=False): for bug in buglist: -@@ -672,7 +720,7 @@ class PrettyBugz: +@@ -672,7 +721,7 @@ class PrettyBugz: except UnicodeDecodeError: print line[:self.columns] |