summaryrefslogtreecommitdiffstats
path: root/usr/share/mageiawelcome/mageiawelcome.py
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2015-12-10 21:37:46 +0100
committerPapoteur <papoteur@mageialinux-online.org>2015-12-10 21:37:46 +0100
commitc98ca1618ecf76c9d3e87758e30866d25fbe714a (patch)
tree78a55985d5b93d15babaa0f645f206d90a36ff17 /usr/share/mageiawelcome/mageiawelcome.py
parentea62237ba3c4a04469258ae9c7a2c33b81a913b3 (diff)
downloadmageiawelcome-c98ca1618ecf76c9d3e87758e30866d25fbe714a.tar
mageiawelcome-c98ca1618ecf76c9d3e87758e30866d25fbe714a.tar.gz
mageiawelcome-c98ca1618ecf76c9d3e87758e30866d25fbe714a.tar.bz2
mageiawelcome-c98ca1618ecf76c9d3e87758e30866d25fbe714a.tar.xz
mageiawelcome-c98ca1618ecf76c9d3e87758e30866d25fbe714a.zip
Apply 2to3
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");')