Merge branch 'master' of github.com:spesmilo/electrum
authorthomasv <thomasv@gitorious>
Wed, 20 Feb 2013 12:10:38 +0000 (13:10 +0100)
committerthomasv <thomasv@gitorious>
Wed, 20 Feb 2013 12:10:38 +0000 (13:10 +0100)
1  2 
lib/util.py

diff --cc lib/util.py
@@@ -22,23 -22,18 +22,24 @@@ def print_msg(*args)
      sys.stdout.write(" ".join(args) + "\n")
      sys.stdout.flush()
  
 +def print_json(obj):
 +    import json
 +    s = json.dumps(obj,sort_keys = True, indent = 4)
 +    sys.stdout.write(s + "\n")
 +    sys.stdout.flush()
 +
  
  def check_windows_wallet_migration():
-     if os.path.exists(os.path.join(os.environ["LOCALAPPDATA"], "Electrum")):
-         if os.path.exists(os.path.join(os.environ["APPDATA"], "Electrum")):
-             print_msg("Two Electrum folders have been found, the default Electrum location for Windows has changed from %s to %s since Electrum 1.7, please check your wallets and fix the problem manually." % (os.environ["LOCALAPPDATA"], os.environ["APPDATA"]))
-             sys.exit()
-         try:
-             shutil.move(os.path.join(os.environ["LOCALAPPDATA"], "Electrum"), os.path.join(os.environ["APPDATA"]))
-             print_msg("Your wallet has been moved from %s to %s."% (os.environ["LOCALAPPDATA"], os.environ["APPDATA"]))
-         except:
-             print_msg("Failed to move your wallet.")
+     if platform.release() != "XP":
+         if os.path.exists(os.path.join(os.environ["LOCALAPPDATA"], "Electrum")):
+             if os.path.exists(os.path.join(os.environ["APPDATA"], "Electrum")):
+                 print_msg("Two Electrum folders have been found, the default Electrum location for Windows has changed from %s to %s since Electrum 1.7, please check your wallets and fix the problem manually." % (os.environ["LOCALAPPDATA"], os.environ["APPDATA"]))
+                 sys.exit()
+             try:
+                 shutil.move(os.path.join(os.environ["LOCALAPPDATA"], "Electrum"), os.path.join(os.environ["APPDATA"]))
+                 print_msg("Your wallet has been moved from %s to %s."% (os.environ["LOCALAPPDATA"], os.environ["APPDATA"]))
+             except:
+                 print_msg("Failed to move your wallet.")
      
  
  def user_dir():