summaryrefslogtreecommitdiffstats
path: root/qml/mageiawelcome.py
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-12-16 08:52:19 +0100
committerPapoteur <papoteur@mageia.org>2018-12-17 10:19:29 +0100
commite8acf867c2e8b674a637331b07e8b79437ba304d (patch)
treec00f44d38d066c9931153132c5d4c21ddd8b5dc1 /qml/mageiawelcome.py
parent71275bf3bae65e5f702be584915a44095cbe5a09 (diff)
downloadmageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.tar
mageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.tar.gz
mageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.tar.bz2
mageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.tar.xz
mageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.zip
Clean python code, pass flakes test
Diffstat (limited to 'qml/mageiawelcome.py')
-rw-r--r--qml/mageiawelcome.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py
index 1f366d3..534b9f4 100644
--- a/qml/mageiawelcome.py
+++ b/qml/mageiawelcome.py
@@ -2,13 +2,12 @@
# -*- coding: utf-8 -*-
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQuick import QQuickView
-from PyQt5.QtQml import qmlRegisterType
from PyQt5.QtCore import QUrl, QLocale, QTranslator, QLibraryInfo, QVariant, QAbstractListModel, \
- QModelIndex, Qt, QObject, pyqtSlot, pyqtProperty
+ QModelIndex, Qt, QObject, pyqtSlot
import sys
import os
import subprocess
-from helpers import *
+from helpers import get_desktop_name, get_desktop_name2, is_installed
import pwd
class ConfList(QAbstractListModel):
@@ -31,8 +30,6 @@ class ConfList(QAbstractListModel):
arch = '64-bit'
else:
arch = '32-bit'
- home = os.getenv("HOME")
- username = os.getenv("USER")
try:
desktop = get_desktop_name(os.path.basename(os.getenv("DESKTOP_SESSION")))
except:
@@ -97,7 +94,7 @@ class Norun(QObject):
os.remove( self.conffile)
else:
os.makedirs(self.home + "/.config/mageiawelcome", exist_ok=True)
- with open( self.conffile, 'w') as f:
+ with open( self.conffile, 'w') :
pass
@pyqtSlot(result=bool)