summaryrefslogtreecommitdiff
path: root/DeviceAuth.py
diff options
context:
space:
mode:
authorDmitrii Morozov <snoopdesigns@gmail.com>2024-05-07 16:34:14 +0200
committerDmitrii Morozov <snoopdesigns@gmail.com>2024-05-07 16:34:14 +0200
commitf5c57d8e73f33ca1d7374a2662fbc7a4592eb7cd (patch)
tree6c6e931b4eadee43a1ee885e780b2b2b6b5ef56f /DeviceAuth.py
parent104c0b32a1e30a56900bb6a17ab9a009c54b76bb (diff)
Python code style
Diffstat (limited to 'DeviceAuth.py')
-rw-r--r--DeviceAuth.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/DeviceAuth.py b/DeviceAuth.py
deleted file mode 100644
index 3374956..0000000
--- a/DeviceAuth.py
+++ /dev/null
@@ -1,22 +0,0 @@
-import json
-import os
-
-class DeviceAuth:
-
- __filename__ = 'device-auth.json'
-
- def device_auth_file_exists(self):
- return os.path.isfile(self.__filename__)
-
- def get_device_auth_details(self):
- if os.path.isfile(self.__filename__):
- with open(self.__filename__, 'r') as fp:
- return json.load(fp)
- return {}
-
- def store_device_auth_details(self, email, details):
- existing = self.get_device_auth_details()
- existing[email] = details
-
- with open(self.__filename__, 'w') as fp:
- json.dump(existing, fp) \ No newline at end of file