forked from toolshed/abra
		
	Grab published abra apps json file
This commit is contained in:
		@ -53,6 +53,19 @@ def _run_cmd(cmd, shell=False):
 | 
				
			|||||||
        exit(1)
 | 
					        exit(1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def get_published_apps_json():
 | 
				
			||||||
 | 
					    """Retrieve already published apps json."""
 | 
				
			||||||
 | 
					    url = "https://abra-apps.cloud.autonomic.zone"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    log.info(f"Retrieving {url}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        return get(url, timeout=5).json()
 | 
				
			||||||
 | 
					    except Exception as exception:
 | 
				
			||||||
 | 
					        log.error(f"Failed to retrieve {url}, saw {str(exception)}")
 | 
				
			||||||
 | 
					        return {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def clone_all_apps():
 | 
					def clone_all_apps():
 | 
				
			||||||
    """Clone all Co-op Cloud apps to ~/.abra/apps."""
 | 
					    """Clone all Co-op Cloud apps to ~/.abra/apps."""
 | 
				
			||||||
    if not exists(CLONES_PATH):
 | 
					    if not exists(CLONES_PATH):
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user