git-svn-id: svn://forre.st/p2pool@1364 470744a7-cac9-478e-843e-5ec1b25c69e8
authorforrest <forrest@470744a7-cac9-478e-843e-5ec1b25c69e8>
Fri, 17 Jun 2011 10:59:58 +0000 (10:59 +0000)
committerforrest <forrest@470744a7-cac9-478e-843e-5ec1b25c69e8>
Fri, 17 Jun 2011 10:59:58 +0000 (10:59 +0000)
main.py

diff --git a/main.py b/main.py
index 8a99835..d3931c5 100644 (file)
--- a/main.py
+++ b/main.py
@@ -553,6 +553,9 @@ if __name__ == '__main__':
     
     args = parser.parse_args()
     
+    if hasattr(sys, "frozen"):
+        __file__ = sys.executable
+    
     if args.bitcoind_p2p_port is None:
         args.bitcoind_p2p_port = {False: 8333, True: 18333}[args.testnet]