diff options
author | Papoteur <papoteur@mageia.org> | 2018-12-16 08:52:19 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2018-12-17 10:19:29 +0100 |
commit | e8acf867c2e8b674a637331b07e8b79437ba304d (patch) | |
tree | c00f44d38d066c9931153132c5d4c21ddd8b5dc1 | |
parent | 71275bf3bae65e5f702be584915a44095cbe5a09 (diff) | |
download | mageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.tar mageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.tar.gz mageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.tar.bz2 mageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.tar.xz mageiawelcome-e8acf867c2e8b674a637331b07e8b79437ba304d.zip |
Clean python code, pass flakes test
-rw-r--r-- | qml/helpers.py | 2 | ||||
-rw-r--r-- | qml/mageiawelcome.py | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/qml/helpers.py b/qml/helpers.py index 52e9660..05fb4c9 100644 --- a/qml/helpers.py +++ b/qml/helpers.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - -import csv import gettext import rpm 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) |