summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2018-12-19 11:45:31 -0800
committerMicah Lee <micah@micahflee.com>2018-12-19 11:45:31 -0800
commit6e0081cebaf9d02aafc772b3ea11a156c718214b (patch)
tree98140239828f02174a3fd47e27677f173e93ee91
parentec5eff5f9de3762aa14e3ca2df72800c10856c2d (diff)
downloadonionshare-6e0081cebaf9d02aafc772b3ea11a156c718214b.tar.gz
onionshare-6e0081cebaf9d02aafc772b3ea11a156c718214b.zip
pwd module doesn't exist in Windows
-rw-r--r--onionshare/settings.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/onionshare/settings.py b/onionshare/settings.py
index a1d96d26..38478dbd 100644
--- a/onionshare/settings.py
+++ b/onionshare/settings.py
@@ -22,7 +22,12 @@ import json
import os
import platform
import locale
-import pwd
+
+try:
+ # We only need pwd module in macOS, and it's not available in Windows
+ import pwd
+except:
+ pass
from . import strings