use the correct module and function name

pull/25/head
Zhansong Li 2019-08-31 17:41:39 +10:00
parent f4868a5bac
commit e1443632a3
1 changed files with 2 additions and 2 deletions

4
aur.py
View File

@ -9,7 +9,7 @@ import tarfile
import os import os
import os.path import os.path
import tempfile import tempfile
import urllib import urllib.parse
DOCUMENTATION = ''' DOCUMENTATION = '''
@ -127,7 +127,7 @@ def install_with_makepkg(module, package):
Install the specified package with makepkg Install the specified package with makepkg
""" """
module.get_bin_path('fakeroot', required=True) module.get_bin_path('fakeroot', required=True)
f = open_url('https://aur.archlinux.org/rpc/?v=5&type=info&arg={}'.format(urllib.quote(package))) f = open_url('https://aur.archlinux.org/rpc/?v=5&type=info&arg={}'.format(urllib.parse.quote(package)))
result = json.loads(f.read().decode('utf8')) result = json.loads(f.read().decode('utf8'))
if result['resultcount'] != 1: if result['resultcount'] != 1:
return (1, '', 'package {} not found'.format(package)) return (1, '', 'package {} not found'.format(package))