Chore Account server

Check-in [234d492f35]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Log update of accounts file
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | master | trunk
Files: files | file ages | folders
SHA3-256:234d492f3535df32d173581aa58702858927535d814cfa4ce5a1fc44ade95d88
User & Date: ajv-899-334-8894@vsta.org 2018-05-09 22:07:43
Context
2018-05-09
22:07
Log update of accounts file Leaf check-in: 234d492f35 user: ajv-899-334-8894@vsta.org tags: master, trunk
2018-04-27
03:52
Track chore changes check-in: 105e6cf694 user: vandyswa@gmail.com tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to main.py.

180
181
182
183
184
185
186

187
188
189
190
191
192
193
        chore.server.Server.__init__(self, cfg, Account_Handler)

    # If account file is newer, reload
    def check_accounts(self):
        st = os.stat(self.cfg["accounts"])
        if st.st_mtime > self.accts_tm:
            # Yup, reload

            self.accts,self.accts_tm = load_accounts(cfg["accounts"])

    # Send back a reply to a Unix-domain socket
    # Our response is the request with a "result" field added
    def reply(self, result, req):
        dest = req["reply-to"]
        if not okname(dest):







>







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
        chore.server.Server.__init__(self, cfg, Account_Handler)

    # If account file is newer, reload
    def check_accounts(self):
        st = os.stat(self.cfg["accounts"])
        if st.st_mtime > self.accts_tm:
            # Yup, reload
	    sys.stderr.write("Reloading %s\n" % (cfg["accounts"],))
            self.accts,self.accts_tm = load_accounts(cfg["accounts"])

    # Send back a reply to a Unix-domain socket
    # Our response is the request with a "result" field added
    def reply(self, result, req):
        dest = req["reply-to"]
        if not okname(dest):