Changeset 3e7dea7 in trunk


Ignore:
Timestamp:
2020-04-17T19:25:42Z (5 years ago)
Author:
Sajith Sasidharan <sajith@…>
Branches:
master
Children:
8b7ef33b
Parents:
8c92187
git-author:
Sajith Sasidharan <sajith@…> (2020-04-06 23:01:22)
git-committer:
Sajith Sasidharan <sajith@…> (2020-04-17 19:25:42)
Message:

Wrap renderer results in tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/web/storage.py

    r8c92187 r3e7dea7  
    3939    @renderer
    4040    def nickname(self, req, tag):
    41         return self._nickname
     41        return tag(self._nickname)
    4242
    4343    @renderer
    4444    def nodeid(self, req, tag):
    45         return idlib.nodeid_b2a(self._storage.my_nodeid)
     45        return tag(idlib.nodeid_b2a(self._storage.my_nodeid))
    4646
    4747    def _get_storage_stat(self, key):
     
    111111    def accepting_immutable_shares(self, req, tag):
    112112        accepting = self._get_storage_stat("storage_server.accepting_immutable_shares")
    113         return {True: "Yes", False: "No"}[bool(accepting)]
     113        return tag({True: "Yes", False: "No"}[bool(accepting)])
    114114
    115115    @renderer
     
    118118        count = s.get("last-complete-bucket-count")
    119119        if count is None:
    120             return "Not computed yet"
    121         return str(count)
     120            return tag("Not computed yet")
     121        return tag(str(count))
    122122
    123123    @renderer
    124124    def count_crawler_status(self, req, tag):
    125125        p = self._storage.bucket_counter.get_progress()
    126         return self.format_crawler_progress(p)
     126        return tag(self.format_crawler_progress(p))
    127127
    128128    def format_crawler_progress(self, p):
Note: See TracChangeset for help on using the changeset viewer.