Suparnpreet commited on
Commit
9415526
·
verified ·
1 Parent(s): a07056f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -27
app.py CHANGED
@@ -16,7 +16,10 @@ else:
16
  print("Error executing command:")
17
  print(cmd1.stderr)
18
  sleep(5)
19
- cmd2 = subprocess.run("apt install wget apt-transport-https", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
 
 
 
20
  if cmd2.returncode == 0:
21
  print("Command output:")
22
  print(cmd2.stdout)
@@ -25,32 +28,32 @@ else:
25
  print("Error executing command:")
26
  print(cmd2.stderr)
27
  sleep(5)
28
- cmd3 = subprocess.run("wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
29
- if cmd3.returncode == 0:
30
- print("Command output:")
31
- print(cmd3.stdout)
32
- else:
33
- # Print the error message
34
- print("Error executing command:")
35
- print(cmd3.stderr)
36
- sleep(5)
37
- cmd4 = subprocess.run("dpkg -i google-chrome-stable_current_amd64.deb", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
38
- if cmd4.returncode == 0:
39
- print("Command output:")
40
- print(cmd4.stdout)
41
- else:
42
- # Print the error message
43
- print("Error executing command:")
44
- print(cmd4.stderr)
45
- sleep(5)
46
- cmd5 = subprocess.run("apt --fix-broken install", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
47
- if cmd5.returncode == 0:
48
- print("Command output:")
49
- print(cmd5.stdout)
50
- else:
51
- # Print the error message
52
- print("Error executing command:")
53
- print(cmd5.stderr)
54
  sleep(5)
55
  st.text("done")
56
  st.text("chrome")
 
16
  print("Error executing command:")
17
  print(cmd1.stderr)
18
  sleep(5)
19
+ cmd2 = subprocess.run("apt-get install -y libglib2.0-0=2.50.3-2 \
20
+ libnss3=2:3.26.2-1.1+deb9u1 \
21
+ libgconf-2-4=3.2.6-4+b1 \
22
+ libfontconfig1=2.11.0-6.7+b1", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
23
  if cmd2.returncode == 0:
24
  print("Command output:")
25
  print(cmd2.stdout)
 
28
  print("Error executing command:")
29
  print(cmd2.stderr)
30
  sleep(5)
31
+ # cmd3 = subprocess.run("wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
32
+ # if cmd3.returncode == 0:
33
+ # print("Command output:")
34
+ # print(cmd3.stdout)
35
+ # else:
36
+ # # Print the error message
37
+ # print("Error executing command:")
38
+ # print(cmd3.stderr)
39
+ # sleep(5)
40
+ # cmd4 = subprocess.run("dpkg -i google-chrome-stable_current_amd64.deb", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
41
+ # if cmd4.returncode == 0:
42
+ # print("Command output:")
43
+ # print(cmd4.stdout)
44
+ # else:
45
+ # # Print the error message
46
+ # print("Error executing command:")
47
+ # print(cmd4.stderr)
48
+ # sleep(5)
49
+ # cmd5 = subprocess.run("apt --fix-broken install", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
50
+ # if cmd5.returncode == 0:
51
+ # print("Command output:")
52
+ # print(cmd5.stdout)
53
+ # else:
54
+ # # Print the error message
55
+ # print("Error executing command:")
56
+ # print(cmd5.stderr)
57
  sleep(5)
58
  st.text("done")
59
  st.text("chrome")