Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix possible conflict by using a truly unique value.

Thanks to @chrisdickinson for pointing this out.  The other value was
not entirely unique, but creating a raw object allows for a unique ID
that can't conflict with other values where the string, however
unlikely, might.
  • Loading branch information...
commit cd05edce4dc0bc19835e60b2fc4341ab588452d8 1 parent 1042ed2
Travis Swicegood authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 armstrong/utils/backends/base.py
4 armstrong/utils/backends/base.py
@@ -3,7 +3,7 @@
3 3 from django.utils.importlib import import_module
4 4
5 5
6   -DID_NOT_HANDLE = "Random return to signify inability to handle"
  6 +DID_NOT_HANDLE = object()
7 7
8 8
9 9 class Proxy(object):
@@ -14,7 +14,7 @@ def __init__(self, possibles, attr):
14 14 def __call__(self, *args, **kwargs):
15 15 for possible in self.possibles:
16 16 ret = getattr(possible, self.attr, None)(*args, **kwargs)
17   - if ret == DID_NOT_HANDLE:
  17 + if ret is DID_NOT_HANDLE:
18 18 continue
19 19 return ret
20 20

0 comments on commit cd05edc

Please sign in to comment.
Something went wrong with that request. Please try again.