mirror of
https://github.com/gutosie/neoboot.git
synced 2025-11-03 12:45:47 +01:00
Update plugin.py
This commit is contained in:
@@ -46,14 +46,10 @@ import os
|
|||||||
import time
|
import time
|
||||||
from time import gmtime, strftime
|
from time import gmtime, strftime
|
||||||
from Tools.Testinout import getTestIn, getTestOut, getTestInTime, getTestOutTime, getAccessN, getAccesDate, getButtonPin, getTestToTest
|
from Tools.Testinout import getTestIn, getTestOut, getTestInTime, getTestOutTime, getAccessN, getAccesDate, getButtonPin, getTestToTest
|
||||||
if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion') or fileExists('/usr/lib/python3.8') or fileExists('/usr/lib/python3.9'):
|
if not fileExists('/etc/vtiversion.info') and not fileExists('/etc/bhversion') and fileExists('/usr/lib/python2.7'):
|
||||||
from Screens.Console import Console
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
from Plugins.Extensions.NeoBoot.files.neoconsole import Console
|
from Plugins.Extensions.NeoBoot.files.neoconsole import Console
|
||||||
except:
|
else:
|
||||||
from Screens.Console import Console
|
from Screens.Console import Console
|
||||||
|
|
||||||
loggscrash = time.localtime(time.time())
|
loggscrash = time.localtime(time.time())
|
||||||
PLUGINVERSION = '9.45'
|
PLUGINVERSION = '9.45'
|
||||||
UPDATEVERSION = '9.45'
|
UPDATEVERSION = '9.45'
|
||||||
@@ -208,10 +204,9 @@ class NeoBootInstallation(Screen):
|
|||||||
writefile.close()
|
writefile.close()
|
||||||
|
|
||||||
def SetDiskLabel(self):
|
def SetDiskLabel(self):
|
||||||
if fileExists('/usr/lib/python3.8') or fileExists('/usr/lib/python3.9') or fileExists('/tmp/.upneo') :
|
#if fileExists('/usr/lib/python3.8') or fileExists('/usr/lib/python3.9') or fileExists('/tmp/.upneo') :
|
||||||
self.session.open(MessageBox, _('Skip this step and install neoboot.\nThis option is available in the neoboot menu.'), type=MessageBox.TYPE_INFO)
|
#self.session.open(MessageBox, _('Skip this step and install neoboot.\nThis option is available in the neoboot menu.'), type=MessageBox.TYPE_INFO)
|
||||||
|
if getCheckExt() != 'vfat' and getCheckExt() == 'ext3' or getCheckExt() == 'ext4':
|
||||||
elif getCheckExt() != 'vfat' and getCheckExt() == 'ext3' or getCheckExt() == 'ext4' :
|
|
||||||
try:
|
try:
|
||||||
from Plugins.Extensions.NeoBoot.files.devices import SetDiskLabel
|
from Plugins.Extensions.NeoBoot.files.devices import SetDiskLabel
|
||||||
self.session.open(SetDiskLabel)
|
self.session.open(SetDiskLabel)
|
||||||
@@ -413,9 +408,9 @@ class NeoBootInstallation(Screen):
|
|||||||
|
|
||||||
def devices(self):
|
def devices(self):
|
||||||
check = False
|
check = False
|
||||||
if fileExists('/usr/lib/python3.8') or fileExists('/usr/lib/python3.9') or fileExists('/tmp/.upneo') :
|
#if fileExists('/usr/lib/python3.8') or fileExists('/usr/lib/python3.9') or fileExists('/tmp/.upneo') :
|
||||||
self.session.open(MessageBox, _('Skip this step and install neoboot.\nThis option is available in the neoboot menu.'), type=MessageBox.TYPE_INFO)
|
#self.session.open(MessageBox, _('Skip this step and install neoboot.\nThis option is available in the neoboot menu.'), type=MessageBox.TYPE_INFO)
|
||||||
elif check == False:
|
if check == False:
|
||||||
message = _('After selecting OK start Mounting Manager, option Mount - green\n')
|
message = _('After selecting OK start Mounting Manager, option Mount - green\n')
|
||||||
message += _('Do you want to run the manager to mount the drives correctly ?\n')
|
message += _('Do you want to run the manager to mount the drives correctly ?\n')
|
||||||
ybox = self.session.openWithCallback(self.device2, MessageBox, message, MessageBox.TYPE_YESNO)
|
ybox = self.session.openWithCallback(self.device2, MessageBox, message, MessageBox.TYPE_YESNO)
|
||||||
@@ -925,10 +920,10 @@ class NeoBootImageChoose(Screen):
|
|||||||
False
|
False
|
||||||
|
|
||||||
def close_exit(self):
|
def close_exit(self):
|
||||||
if fileExists('/usr/lib/python3.9') or fileExists('/usr/lib/python3.8'):
|
if fileExists('/usr/lib/python2.7'):
|
||||||
self.close()
|
|
||||||
else:
|
|
||||||
self.close_exit2()
|
self.close_exit2()
|
||||||
|
else:
|
||||||
|
self.close()
|
||||||
|
|
||||||
def close_exit2(self):
|
def close_exit2(self):
|
||||||
system('touch /tmp/.init_reboot')
|
system('touch /tmp/.init_reboot')
|
||||||
@@ -1542,7 +1537,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
message = (_('The %sImagesUpload directory is EMPTY!!!\nInstall the plugin to download new image online ?\n --- Continue? ---') % getNeoLocation())
|
message = (_('The %sImagesUpload directory is EMPTY!!!\nInstall the plugin to download new image online ?\n --- Continue? ---') % getNeoLocation())
|
||||||
ybox = self.session.openWithCallback(self.ImageDownloader, MessageBox, message, MessageBox.TYPE_YESNO)
|
ybox = self.session.openWithCallback(self.ImageDownloader, MessageBox, message, MessageBox.TYPE_YESNO)
|
||||||
ybox.setTitle(_('Installation'))
|
ybox.setTitle(_('Installation'))
|
||||||
elif fileExists('/usr/lib/python3.8') or fileExists('/usr/lib/python3.9') and fileExists('/.multinfo'):
|
elif not fileExists('/usr/lib/python2.7') and fileExists('/.multinfo'):
|
||||||
self.session.open(MessageBox, _('Sorry, cannot open neo menu install image.'), type=MessageBox.TYPE_ERROR)
|
self.session.open(MessageBox, _('Sorry, cannot open neo menu install image.'), type=MessageBox.TYPE_ERROR)
|
||||||
else:
|
else:
|
||||||
message = (_('Catalog %sImagesUpload directory is empty\nPlease upload the image files in zip or nfi formats to install') % getNeoLocation())
|
message = (_('Catalog %sImagesUpload directory is empty\nPlease upload the image files in zip or nfi formats to install') % getNeoLocation())
|
||||||
@@ -1654,9 +1649,7 @@ def readline(filename, iferror=''):
|
|||||||
|
|
||||||
|
|
||||||
def checkInternet():
|
def checkInternet():
|
||||||
if fileExists('/usr/lib/python3.8') or fileExists('/usr/lib/python3.9'):
|
if fileExists('/usr/lib/python2.7'):
|
||||||
return True
|
|
||||||
else:
|
|
||||||
import urllib2
|
import urllib2
|
||||||
import urllib
|
import urllib
|
||||||
try:
|
try:
|
||||||
@@ -1668,6 +1661,8 @@ def checkInternet():
|
|||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def checkimage():
|
def checkimage():
|
||||||
|
|||||||
Reference in New Issue
Block a user