mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
import: split out URL handling into its own function
This is preparation to add other import methods, like checking if the command was run in a currently checked out git repo.
This commit is contained in:
parent
9489e80f09
commit
c80c1bf017
2 changed files with 63 additions and 56 deletions
|
|
@ -579,8 +579,11 @@ def split_list_values(s):
|
|||
return [v for v in l if v]
|
||||
|
||||
|
||||
def get_default_app_info_list(apps, metadatapath):
|
||||
appid = os.path.splitext(os.path.basename(metadatapath))[0]
|
||||
def get_default_app_info_list(apps, metadatapath=None):
|
||||
if metadatapath is None:
|
||||
appid = None
|
||||
else:
|
||||
appid = os.path.splitext(os.path.basename(metadatapath))[0]
|
||||
if appid in apps:
|
||||
logging.critical("'%s' is a duplicate! '%s' is already provided by '%s'"
|
||||
% (metadatapath, appid, apps[appid]['metadatapath']))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue