Commits

André Sintzoff  committed 5dd808c

Fix regression on Windows XP in determining data root

  • Participants
  • Parent commits 6df881a

Comments (0)

Files changed (1)

File keyring/util/platform.py

 platform = sys.modules['platform']
 
 def _data_root_Windows():
-	return os.path.join(os.environ['LOCALAPPDATA'], 'Python Keyring')
+	try:
+		root = os.environ['LOCALAPPDATA']
+	except KeyError:
+		# Windows XP
+		root = os.path.join(os.environ['USERPROFILE'], 'Local Settings')
+	return os.path.join(root, 'Python Keyring')
 
 def _data_root_Linux():
 	"""