mirror of
https://github.com/Leseratte10/acsm-calibre-plugin.git
synced 2024-12-22 09:19:55 +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:
|
||||
# Windows
|
||||
uid = 1000
|
||||
username = os.getlogin().encode("utf-8").decode("latin-1")
|
||||
try:
|
||||
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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user