Skip to content

Commit

Permalink
Use a class instead of object() to model undefined.
Browse files Browse the repository at this point in the history
This has the same effect, but makes it be printed more obviously
when debugging.
  • Loading branch information
nh2 committed Dec 8, 2017
1 parent c91ce3e commit 13a9cae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nixops/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ def abs_nix_path(x):
return xs[0] + '=' + _maybe_abspath(xs[1])


undefined = object()
class Undefined:
pass

undefined = Undefined()


def attr_property(name, default, type=str):
"""Define a property that corresponds to a value in the NixOps state file."""
Expand Down

0 comments on commit 13a9cae

Please sign in to comment.