mirror of
				https://github.com/kewlfft/ansible-aur.git
				synced 2025-11-04 10:02:30 +03:00 
			
		
		
		
	use the correct module and function name
This commit is contained in:
		
							
								
								
									
										4
									
								
								aur.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								aur.py
									
									
									
									
									
								
							@@ -9,7 +9,7 @@ import tarfile
 | 
			
		||||
import os
 | 
			
		||||
import os.path
 | 
			
		||||
import tempfile
 | 
			
		||||
import urllib
 | 
			
		||||
import urllib.parse
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
DOCUMENTATION = '''
 | 
			
		||||
@@ -127,7 +127,7 @@ def install_with_makepkg(module, package):
 | 
			
		||||
    Install the specified package with makepkg
 | 
			
		||||
    """
 | 
			
		||||
    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'))
 | 
			
		||||
    if result['resultcount'] != 1:
 | 
			
		||||
        return (1, '', 'package {} not found'.format(package))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user