Import error pwd on Windows
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import hashlib
|
import hashlib
|
||||||
import os.path
|
import os.path
|
||||||
import platform
|
import platform
|
||||||
import pwd
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
def getDataDir():
|
def getDataDir():
|
||||||
@@ -10,6 +9,7 @@ def getDataDir():
|
|||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
return os.path.join(os.environ['APPDATA'], 'CouchPotato')
|
return os.path.join(os.environ['APPDATA'], 'CouchPotato')
|
||||||
|
|
||||||
|
import pwd
|
||||||
os.environ['HOME'] = pwd.getpwuid(os.geteuid()).pw_dir
|
os.environ['HOME'] = pwd.getpwuid(os.geteuid()).pw_dir
|
||||||
user_dir = os.path.expanduser('~')
|
user_dir = os.path.expanduser('~')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user