diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/base/anon_collection.py | 3 | ||||
-rw-r--r-- | wqflask/utility/elasticsearch_tools.py | 2 | ||||
-rw-r--r-- | wqflask/utility/svg.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/base/anon_collection.py b/wqflask/base/anon_collection.py index 8ee73296..dd1aa27f 100644 --- a/wqflask/base/anon_collection.py +++ b/wqflask/base/anon_collection.py @@ -1,6 +1,6 @@ class AnonCollection(TraitCollection):
- def __init__(self, anon_id)
+ def __init__(self, anon_id):
self.anon_id = anon_id
self.collection_members = Redis.smembers(self.anon_id)
print("self.collection_members is:", self.collection_members)
@@ -12,6 +12,7 @@ class AnonCollection(TraitCollection): print("traits_to_remove:", traits_to_remove)
for trait in traits_to_remove:
Redis.srem(self.anon_id, trait)
+
members_now = self.collection_members - traits_to_remove
print("members_now:", members_now)
print("Went from {} to {} members in set.".format(len(self.collection_members), len(members_now)))
diff --git a/wqflask/utility/elasticsearch_tools.py b/wqflask/utility/elasticsearch_tools.py index 1dba357d..d35cb5ee 100644 --- a/wqflask/utility/elasticsearch_tools.py +++ b/wqflask/utility/elasticsearch_tools.py @@ -7,7 +7,7 @@ logger = getLogger(__name__) from utility.tools import ELASTICSEARCH_HOST, ELASTICSEARCH_PORT def test_elasticsearch_connection(): - es = Elasticsearch(['http://'+ELASTICSEARCH_HOST+":"+ELASTICSEARCH_PORT+'/'], verify_certs=True) + es = Elasticsearch(['http://'+ELASTICSEARCH_HOST+":"+str(ELASTICSEARCH_PORT)+'/'], verify_certs=True) if not es.ping(): logger.warning("Elasticsearch is DOWN") diff --git a/wqflask/utility/svg.py b/wqflask/utility/svg.py index 512bc9e6..db13b9d1 100644 --- a/wqflask/utility/svg.py +++ b/wqflask/utility/svg.py @@ -1029,7 +1029,7 @@ class drawing: try: xv.feed(svg) except: - raise "SVG is not well formed, see messages above" + raise Exception("SVG is not well formed, see messages above") else: print "SVG well formed" if __name__=='__main__': |