Skip to content

Commit

Permalink
Bugfix of IOError when hyperion.config.json is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Szczerba committed Jan 8, 2017
1 parent 204ea40 commit a9b6124
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.program.hyperion.configurator" name="Hyperion Config Creator" version="1.8.0" provider-name="tociek"> <addon id="plugin.program.hyperion.configurator" name="Hyperion Config Creator" version="1.8.1" provider-name="tociek">
<requires> <requires>
<import addon="xbmc.python" version="2.14.0"/> <import addon="xbmc.python" version="2.14.0"/>
</requires> </requires>
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Expand Up @@ -15,3 +15,4 @@
1.7.1 V4l2 crop default values adjusted for HDMI 4.0 kit 1.7.1 V4l2 crop default values adjusted for HDMI 4.0 kit
1.7.2 Added BRG color order 1.7.2 Added BRG color order
1.8.0 Lighberry XL added to led device type 1.8.0 Lighberry XL added to led device type
1.8.1 Bugfix of IOError when hyperion.config.json is not present
6 changes: 5 additions & 1 deletion resources/lib/HyperPyCon.py
Expand Up @@ -157,7 +157,11 @@ def overwrite_default_config(self):
subprocess.call(["sudo","cp",config_folder+"hyperion.config.json",config_folder+"hyperion.config.json_bak"]) subprocess.call(["sudo","cp",config_folder+"hyperion.config.json",config_folder+"hyperion.config.json_bak"])
subprocess.call(["sudo","cp",self.new_hyperion_config_path,config_folder+"hyperion.config.json"]) subprocess.call(["sudo","cp",self.new_hyperion_config_path,config_folder+"hyperion.config.json"])
else: else:
shutil.copyfile(config_folder+"hyperion.config.json",config_folder+"hyperion.config.json_bak") try:
shutil.copyfile(config_folder+"hyperion.config.json",config_folder+"hyperion.config.json_bak")
except:
""" Ignore IO exception that might occur when there is no hyperion.config.json to backup """
pass
shutil.copyfile(self.new_hyperion_config_path,config_folder+"hyperion.config.json") shutil.copyfile(self.new_hyperion_config_path,config_folder+"hyperion.config.json")


def config_grabber(self,grabber_model): def config_grabber(self,grabber_model):
Expand Down

0 comments on commit a9b6124

Please sign in to comment.