From 2e007b449f33fad2fa003382ed76931fd962118f Mon Sep 17 00:00:00 2001 From: Chris Warrick Date: Mon, 22 Aug 2016 14:39:24 +0200 Subject: [PATCH] Properly prevent RPC requests with no arguments Signed-off-by: Chris Warrick --- pkgbuilder/aur.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgbuilder/aur.py b/pkgbuilder/aur.py index 61e1b47..236a319 100644 --- a/pkgbuilder/aur.py +++ b/pkgbuilder/aur.py @@ -59,7 +59,7 @@ def rpc(self): def jsonreq(self, rtype, arg, search_by=None): """Make a request and return plain JSON data.""" - if arg == []: + if not arg: # No need to bother. return self.emptystr % (self.rpcver, rtype) @@ -81,7 +81,7 @@ def jsonreq(self, rtype, arg, search_by=None): def jsonmultiinfo(self, args): """Make a multiinfo request and return plain JSON data.""" - if args == []: + if not args: # No need to bother. return self.emptystr % (self.rpcver, 'multiinfo')