reformatted conf file error message, including a randomly generated password
authorForrest Voight <forrest.voight@gmail.com>
Thu, 26 Jan 2012 22:20:16 +0000 (17:20 -0500)
committerForrest Voight <forrest.voight@gmail.com>
Thu, 26 Jan 2012 22:21:05 +0000 (17:21 -0500)
p2pool/main.py

index 8f2e990..b282531 100644 (file)
@@ -950,10 +950,10 @@ def run():
         conf_path = net.CONF_FILE_FUNC()
         if not os.path.exists(conf_path):
             parser.error('''Bitcoin configuration file not found. Manually enter your RPC password.\r\n'''
-                '''If you actually haven't created a configuration file, you should create\r\n'''
-                '''one at %s with the text:\r\n'''
-                '''|    server=true\r\n'''
-                '''|    rpcpassword=<A LONG RANDOM PASSWORD THAT YOU DON'T HAVE TO REMEMBER>''' % (net.CONF_FILE_FUNC(),))
+                '''If you actually haven't created a configuration file, you should create one at %s with the text:\r\n'''
+                '''\r\n'''
+                '''server=true\r\n'''
+                '''rpcpassword=%x # (randomly generated for your convenience)''' % (conf_path, random.randrange(2**128)))
         with open(conf_path, 'rb') as f:
             cp = ConfigParser.RawConfigParser()
             cp.readfp(StringIO.StringIO('[x]\r\n' + f.read()))