summaryrefslogtreecommitdiffstats
path: root/usr/share/mageiawelcome/mageiawelcome.py
diff options
context:
space:
mode:
Diffstat (limited to 'usr/share/mageiawelcome/mageiawelcome.py')
-rw-r--r--usr/share/mageiawelcome/mageiawelcome.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/usr/share/mageiawelcome/mageiawelcome.py b/usr/share/mageiawelcome/mageiawelcome.py
index 2c2ab9d..072738a 100644
--- a/usr/share/mageiawelcome/mageiawelcome.py
+++ b/usr/share/mageiawelcome/mageiawelcome.py
@@ -3,8 +3,8 @@
import signal
import os
import time
-import urllib
-import commands
+import urllib.request, urllib.parse, urllib.error
+import subprocess
import subprocess
import shlex
import gettext
@@ -43,9 +43,9 @@ def main():
#collect sys info
#release = open("/etc/release", "r").read()
- release = commands.getoutput('lsb_release -sd')
+ release = subprocess.getoutput('lsb_release -sd')
release = release[1:-1]
- kernel = commands.getoutput('uname -r')
+ kernel = subprocess.getoutput('uname -r')
if os.uname()[4] == 'x86_64':
arch = '64-bit'
else:
@@ -200,32 +200,32 @@ def main():
elif msg.startswith("run"):
args = shlex.split(msg)
args.pop(0)
- print args
+ print(args)
if args[0] == "xvt":
os.chdir(home)
subprocess.Popen(args)
elif msg.startswith("gurpmi"):
- print msg
+ print(msg)
args = shlex.split(msg)
cat = args.pop(1)
- print args
+ print(args)
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
proc.wait()
- print proc.returncode
+ print(proc.returncode)
if (proc.returncode == 0):
listapp = get_listapp()
web_send('$("ul#lista_applikacji").html("'+listapp+'");$("li#'+cat+'").trigger("click");')
else: pass
elif msg.startswith("install_selected"):
- print msg
+ print(msg)
msg2 = msg.replace('install_selected','gurpmi')
args = shlex.split(msg2)
cat = args.pop(1)
- print args
+ print(args)
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
proc.wait()
- print proc.returncode
+ print(proc.returncode)
if (proc.returncode == 0):
listapp = get_listapp()
web_send('$("ul#lista_applikacji").html("'+listapp+'");$("li#'+cat+'").trigger("click");')