Skip to content

Commit

Permalink
Merge pull request #10 from tomaszszczerba/dev
Browse files Browse the repository at this point in the history
Bugfix of IOError when hyperion.config.json is not present
  • Loading branch information
tociek committed Jan 8, 2017
2 parents 204ea40 + a9b6124 commit 7bada44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?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>
<import addon="xbmc.python" version="2.14.0"/>
</requires>
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
1.7.1 V4l2 crop default values adjusted for HDMI 4.0 kit
1.7.2 Added BRG color order
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
Original file line number Diff line number Diff line change
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",self.new_hyperion_config_path,config_folder+"hyperion.config.json"])
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")

def config_grabber(self,grabber_model):
Expand Down

0 comments on commit 7bada44

Please sign in to comment.