diff --git a/display-drivers/waveshare35b/manifest.json b/display-drivers/waveshare35b/manifest.json new file mode 100644 index 0000000..e80c3e5 --- /dev/null +++ b/display-drivers/waveshare35b/manifest.json @@ -0,0 +1 @@ +{"driver": "waveshare35b", "options": {"dtoverlay": "waveshare35b"}, "install": [{"src": "waveshare35b-overlay.dtb", "dst": "/boot/overlays/waveshare35b.dtbo"}, {"src": "waveshare35b-overlay.dtb", "dst": "/boot/overlays/waveshare35b-overlay.dtb"}]} \ No newline at end of file diff --git a/display-drivers/waveshare35b/waveshare35b-overlay.dtb b/display-drivers/waveshare35b/waveshare35b-overlay.dtb new file mode 100644 index 0000000..69d4f9a Binary files /dev/null and b/display-drivers/waveshare35b/waveshare35b-overlay.dtb differ diff --git a/frame.py b/frame.py index e416591..0dea45c 100755 --- a/frame.py +++ b/frame.py @@ -376,11 +376,14 @@ def oauthSetToken(token): oauth = OAuth(settings.get('local-ip'), oauthSetToken, oauthGetToken) if os.path.exists('/root/photoframe_config/oauth.json'): - with open('/root/photoframe_config/oauth.json') as f: - data = json.load(f) - if 'web' in data: # if someone added it via command-line - data = data['web'] - oauth.setOAuth(data) + try: + with open('/root/photoframe_config/oauth.json') as f: + data = json.load(f) + if 'web' in data: # if someone added it via command-line + data = data['web'] + oauth.setOAuth(data) + except: + logging.exception('OAuth file is corrupt, do not use') # Prep random random.seed(long(time.clock()))