Skip to content

Commit

Permalink
fix BSOD then get io error open STARTUP files
Browse files Browse the repository at this point in the history
  • Loading branch information
captain committed Apr 22, 2019
1 parent 9ff750a commit 11375cc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
10 changes: 7 additions & 3 deletions lib/python/Plugins/SystemPlugins/SoftwareManager/Flash_online.py
Expand Up @@ -225,9 +225,13 @@ def read_current_multiboot(self):

def read_startup(self, FILE):
file = FILE
with open(file, 'r') as myfile:
data=myfile.read().replace('\n', '')
myfile.close()
try:
with open(file, 'r') as myfile:
data=myfile.read().replace('\n', '')
myfile.close()
except IOError:
print "[ERROR] failed to open file %s" % file
data = " "
return data

def find_rootfs_dev(self, file):
Expand Down
10 changes: 7 additions & 3 deletions lib/python/Plugins/SystemPlugins/SoftwareManager/ImageBackup.py
Expand Up @@ -211,9 +211,13 @@ def read_current_multiboot(self):

def read_startup(self, FILE):
self.file = FILE
with open(self.file, 'r') as myfile:
data=myfile.read().replace('\n', '')
myfile.close()
try:
with open(self.file, 'r') as myfile:
data=myfile.read().replace('\n', '')
myfile.close()
except IOError:
print "[ERROR] failed to open file %s" % file
data = " "
return data

def find_rootfs_dev(self, file):
Expand Down
10 changes: 7 additions & 3 deletions lib/python/Screens/About.py
Expand Up @@ -259,9 +259,13 @@ def find_rootfssubdir(file):

def read_startup(FILE):
file = FILE
with open(file, 'r') as myfile:
data=myfile.read().replace('\n', '')
myfile.close()
try:
with open(file, 'r') as myfile:
data=myfile.read().replace('\n', '')
myfile.close()
except IOError:
print "[ERROR] failed to open file %s" % file
data = " "
return data

class About(Screen):
Expand Down

0 comments on commit 11375cc

Please sign in to comment.