File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,13 @@ def fetchlist():
2929
3030def fetchlocalmet ():
3131 print ("fetch local metadata..." )
32- with open (metapath , 'r' ) as f :
32+ try :
33+ with open (metapath , 'r' ) as f :
3334 localmetadata = json .load (f )
34- return localmetadata
35+ return localmetadata
36+ except Exception :
37+ print ("local metadata file doesn't exist, returning empty metadata..." )
38+ return {}
3539
3640def checkpackagelist (item ):
3741 pkglist = fetchlist ()
@@ -54,12 +58,7 @@ def metawrite(metadata, path):
5458
5559def install (item ):
5660 os .system ("curl -O " + url + item + "/protocols/install.sh && bash install.sh && rm install.sh" )
57- try :
58- with open (path , 'r' ) as f :
59- localmetadata = json .load (f )
60- except Exception :
61- localmetadata = {}
62- metawrite (localmetadata , metapath )
61+ localmetadata = fetchlocalmet ()
6362 cloudmetadata = fetchlist ()
6463 localmetadata [item ]= cloudmetadata [item ]
6564 metawrite (localmetadata , metapath )
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " agpm"
7- version = " 2.1.0 "
7+ version = " 2.1.1 "
88description = " A package manager made in python to download EyeScary Development projects"
99readme = " README.md"
1010authors = [{ name = " EyeScary Development" }]
You can’t perform that action at this time.
0 commit comments