python-aidot 0.3.50__tar.gz → 0.3.51__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-aidot
3
- Version: 0.3.50
3
+ Version: 0.3.51
4
4
  Summary: aidot control wifi lights
5
5
  Home-page: https://github.com/Aidot-Development-Team/python-aidot
6
6
  Author: aidotdev2024
@@ -77,7 +77,7 @@ class AidotClient:
77
77
  password: str | None = None,
78
78
  token: dict | None = None,
79
79
  ) -> None:
80
- _LOGGER.warning(f"Aidot Client Version: v0.3.50")
80
+ _LOGGER.warning(f"Aidot Client Version: v0.3.51")
81
81
  self.session = session
82
82
  self.username = username
83
83
  self.password = password
@@ -110,13 +110,16 @@ class AidotClient:
110
110
  file_path = Path.home() / ".aidot_terminal_id"
111
111
 
112
112
  def _read_or_create() -> str:
113
- if file_path.exists():
114
- return file_path.read_text().strip()
115
- node = uuid.getnode()
116
- is_random = (node >> 40) & 1
117
- raw_id = str(uuid.uuid4()) if is_random else format(node, "x")
118
- file_path.write_text(raw_id)
119
- return raw_id
113
+ try:
114
+ if file_path.exists():
115
+ return file_path.read_text().strip()
116
+ node = uuid.getnode()
117
+ is_random = (node >> 40) & 1
118
+ raw_id = str(uuid.uuid4()) if is_random else format(node, "x")
119
+ file_path.write_text(raw_id)
120
+ return raw_id
121
+ except OSError:
122
+ return 'gvz3gjae10l4zii00t7y0'
120
123
 
121
124
  raw_id = await asyncio.to_thread(_read_or_create)
122
125
  return hashlib.md5(raw_id.encode()).hexdigest()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-aidot
3
- Version: 0.3.50
3
+ Version: 0.3.51
4
4
  Summary: aidot control wifi lights
5
5
  Home-page: https://github.com/Aidot-Development-Team/python-aidot
6
6
  Author: aidotdev2024
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="python-aidot",
8
- version="0.3.50",
8
+ version="0.3.51",
9
9
  author="aidotdev2024",
10
10
  url='https://github.com/Aidot-Development-Team/python-aidot',
11
11
  description="aidot control wifi lights",
File without changes
File without changes
File without changes