mirror of
https://github.com/Leseratte10/acsm-calibre-plugin.git
synced 2024-12-23 01:34:36 +06:00
Fix username code for Windows python 2
This commit is contained in:
parent
d88f0fc9a4
commit
03d8221cdc
@ -194,7 +194,11 @@ def makeSerial(random):
|
|||||||
except:
|
except:
|
||||||
# Windows
|
# Windows
|
||||||
uid = 1000
|
uid = 1000
|
||||||
|
try:
|
||||||
username = os.getlogin().encode("utf-8").decode("latin-1")
|
username = os.getlogin().encode("utf-8").decode("latin-1")
|
||||||
|
except:
|
||||||
|
import getpass
|
||||||
|
username = getpass.getuser().encode("utf-8").decode("latin-1")
|
||||||
|
|
||||||
mac_address = get_mac_address()
|
mac_address = get_mac_address()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user