From 8514036d9fcd4f1a4a844009c479d48738c19883 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 12 2016 14:36:31 +0000 Subject: Also raise an error if both package name and source package name are set --- diff --git a/mdapi/__init__.py b/mdapi/__init__.py index 4f82bb1..f99922a 100644 --- a/mdapi/__init__.py +++ b/mdapi/__init__.py @@ -60,7 +60,7 @@ def _get_pkg(branch, name=None, action=None, srcname=None): ''' Return the pkg information for the given package in the specified branch or raise an aiohttp exception. ''' - if not name and not srcname: + if (not name and not srcname) or (name and srcname): raise web.HTTPBadRequest() pkg = None