Skip to content

Commit

Permalink
Properly prevent RPC requests with no arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <[email protected]>
  • Loading branch information
Kwpolska committed Aug 22, 2016
1 parent 77c27fa commit 2e007b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgbuilder/aur.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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')

Expand Down

0 comments on commit 2e007b4

Please sign in to comment.