blob: d916f01b1343103c514fae66aefa8089a28cc927 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
class UniqueID(object):
'''UniqueID facade.
Returns the following depending on the platform:
* **Android**: Android ID
* **OS X**: Serial number of the device
* **Linux**: Serial number using lshw
* **Windows**: MachineGUID from regkey
.. versionadded:: 1.2.0
.. versionchanged:: 1.2.4
On Android returns Android ID instead of IMEI.
'''
@property
def id(self):
'''Property that returns the unique id of the platform.
'''
return self.get_uid()
def get_uid(self):
return self._get_uid()
# private
def _get_uid(self, **kwargs):
raise NotImplementedError()
|