Skip to content

Commit

Permalink
_None() as new style class
Browse files Browse the repository at this point in the history
  • Loading branch information
tpltnt committed Mar 2, 2018
1 parent 1967cd7 commit a41d827
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/allmydata/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ def formatTimeTahoeStyle(self, when):
are set to disallow users other than its owner from reading the contents of
the files. See the 'configuration.rst' documentation file for details."""

class _None: # used as a marker in get_config()
class _None(object):
"""
This class is to be used as a marker in get_config()
"""
pass

class MissingConfigEntry(Exception):
Expand Down Expand Up @@ -299,7 +302,7 @@ def init_tempdir(self):
# which is frequently too small.
temp_fd, test_name = tempfile.mkstemp()
_assert(os.path.dirname(test_name) == tempdir, test_name, tempdir)
os.close(temp_fd)
os.close(temp_fd) # avoid leak of unneeded fd

def check_privacy(self):
self._reveal_ip = self.config.get_config("node", "reveal-IP-address", True,
Expand Down

0 comments on commit a41d827

Please sign in to comment.