bug testing
This commit is contained in:
parent
f773f3fa91
commit
bffbeb3b68
@ -23,7 +23,7 @@ def install(name:str, Packages:list):
|
|||||||
try:
|
try:
|
||||||
|
|
||||||
if name in [row[0] for row in Packages.packages]:
|
if name in [row[0] for row in Packages.packages]:
|
||||||
raise Exception("Package already installed")
|
return
|
||||||
|
|
||||||
with open(("./packages/"+name+".py"), "r") as f:
|
with open(("./packages/"+name+".py"), "r") as f:
|
||||||
line = f.readline()
|
line = f.readline()
|
||||||
|
2
main.py
2
main.py
@ -139,6 +139,8 @@ class packagemanager:
|
|||||||
|
|
||||||
|
|
||||||
def install(self, name: str) -> int:
|
def install(self, name: str) -> int:
|
||||||
|
if name in [row[0] for row in Packages.packages]:
|
||||||
|
raise Exception("Package already installed")
|
||||||
try:
|
try:
|
||||||
if not os.path.exists(f"./packages/{name}.py"):
|
if not os.path.exists(f"./packages/{name}.py"):
|
||||||
raise FileNotFoundError(name)
|
raise FileNotFoundError(name)
|
||||||
|
@ -1 +0,0 @@
|
|||||||
[['builtin', 'packages.builtin', ['echo', 'ls', 'rm', 'clear', 'cd', 'll']], ['netget', 'packages.netget', ['netget']], ['netget', 'packages.netget', ['netget']], ['netget', 'packages.netget', ['netget']]]
|
|
@ -1,24 +0,0 @@
|
|||||||
#["netget", "packages.netget", ["netget"]]
|
|
||||||
# Made By OusmeBlueNinja
|
|
||||||
import os, sys
|
|
||||||
|
|
||||||
|
|
||||||
def netget(command: list):
|
|
||||||
|
|
||||||
print(command, len(command))
|
|
||||||
if len(command) != 2:
|
|
||||||
print("comand requires [ url ] [ path ]")
|
|
||||||
return
|
|
||||||
|
|
||||||
url = command[0]
|
|
||||||
location = command[1]
|
|
||||||
try:
|
|
||||||
import wget
|
|
||||||
wget.download(url, location)
|
|
||||||
except ImportError:
|
|
||||||
os.system(f"wget {url} -O {location}")
|
|
||||||
|
|
||||||
except:
|
|
||||||
print("cannot download")
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user