summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorNate Case <ncase@xes-inc.com>2008-09-10 17:14:33 -0500
committerJeremy Kerr <jk@ozlabs.org>2008-09-11 16:47:09 +1000
commitf50fceb55d5530318dac1d2bf679558268a2a230 (patch)
treedd5c5547ebdf5e782184a53d10576603c5671430 /apps
parenta72679a9622db66e828e86377f29c9c0c6574d69 (diff)
downloadpatchwork-f50fceb55d5530318dac1d2bf679558268a2a230.tar.bz2
patchwork-f50fceb55d5530318dac1d2bf679558268a2a230.tar.xz
pwclient: Get rid of underscore to dash replacement
I was erroneously doing some string substitutions so that it would find project names with an underscore in the name. It was only necessary due to a side effect of a bug fixed in commit 35241d528c3699b982730a333e236d57dc6451b6 (find project by linkname, not full name). In my test case, I had an underscore in the linkname, but a dash in the full name. No such string replacement is necessary, and actually breaks filtering by projects with an underscore in the name now that we're searching by linkname properly. Signed-off-by: Nate Case <ncase@xes-inc.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps')
-rwxr-xr-xapps/patchwork/bin/pwclient8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/patchwork/bin/pwclient b/apps/patchwork/bin/pwclient
index 9b35240..e25212a 100755
--- a/apps/patchwork/bin/pwclient
+++ b/apps/patchwork/bin/pwclient
@@ -128,11 +128,9 @@ def project_id_by_name(rpc, linkname):
"""Given a project short name, look up the Project ID."""
if len(linkname) == 0:
return 0
- # The search requires - instead of _
- search = linkname.replace("_", "-")
- projects = rpc.project_list(search, 0)
+ projects = rpc.project_list(linkname, 0)
for project in projects:
- if project['linkname'].replace("_", "-") == search:
+ if project['linkname'] == linkname:
return project['id']
return 0
@@ -205,7 +203,7 @@ def action_projects(rpc):
print("%-5s %-24s %s" % ("--", "----", "-----------"))
for project in projects:
print("%-5d %-24s %s" % (project['id'], \
- project['linkname'].replace("_", "-"), \
+ project['linkname'], \
project['name']))
def action_states(rpc):