Read the device configuration from device.json file. :return: dict - the device configuration
(token)
| 48 | |
| 49 | |
| 50 | def get_device(token): |
| 51 | """ |
| 52 | Read the device configuration from device.json file. |
| 53 | :return: dict - the device configuration |
| 54 | """ |
| 55 | try: |
| 56 | with open("/tmp/{}/device.json".format(token), "r") as f: |
| 57 | return json.load(f) |
| 58 | except: |
| 59 | pass |
| 60 | |
| 61 | |
| 62 | def get_apname(): |