PEP8 double aggressive E301 ~ E306

This commit is contained in:
persianpros
2021-04-14 00:13:51 +04:30
parent 334f3e0ed9
commit ab9168b43f
56 changed files with 183 additions and 36 deletions

View File

@@ -8,9 +8,12 @@ import shutil
# ver. gutosie
#--------------------------------------------- 2021 ---------------------------------------------#
def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole):
NEOBootR(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole)
def LanguageUsed():
language = ''
lang = open('/etc/enigma2/settings', 'r')
@@ -22,6 +25,7 @@ def LanguageUsed():
language = 'No'
return language
def getBoxHostName():
if os.path.exists('/etc/hostname'):
with open('/etc/hostname', 'r') as f:
@@ -29,6 +33,7 @@ def getBoxHostName():
f.close()
return myboxname
def getCPUSoC():
chipset = 'UNKNOWN'
if os.path.exists('/proc/stb/info/chipset'):
@@ -40,6 +45,7 @@ def getCPUSoC():
return chipset
def getBoxVuModel():
vumodel = 'UNKNOWN'
if os.path.exists("/proc/stb/info/vumodel") and not os.path.exists("/proc/stb/info/boxtype"):
@@ -48,6 +54,7 @@ def getBoxVuModel():
f.close()
return vumodel
def getCPUtype():
cpu = 'UNKNOWN'
if os.path.exists('/proc/cpuinfo'):
@@ -60,12 +67,14 @@ def getCPUtype():
cpu = 'MIPS'
return cpu
def getKernelVersion():
try:
return open('/proc/version', 'r').read().split(' ', 4)[2].split('-', 2)[0]
except:
return _('unknown')
def getNeoLocation():
locatino = 'UNKNOWN'
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location'):
@@ -672,6 +681,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan
os.system('echo "End of installation:"; date +%T')
os.system('echo "If you want to save the installation process from the console press green."')
def RemoveUnpackDirs():
os.chdir(media + '/ImagesUpload')
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/unpackedzip'):
@@ -1007,7 +1017,6 @@ def NEOBootExtract(source, target, ZipDelete):
os.chdir('osmini')
brand = 'osmini'
#Instalacja image nandsim
os.system('echo "Instalacja - nandsim w toku..."')
rc = os.system('insmod /lib/modules/' + getKernelVersion() + '/kernel/drivers/mtd/nand/nandsim.ko cache_file=' + getNeoLocation() + 'image_cache first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15;sleep 5')#% getKernelVersion())