Author: adc
Date: Sun Mar 29 18:01:11 2015
New Revision: 1669944

URL: http://svn.apache.org/r1669944
Log:
I love single quotes, it's more eco-friendly

Modified:
    steve/steve-web/src/asf/steve/backends/elastic.py
    steve/steve-web/src/asf/steve/backends/file.py

Modified: steve/steve-web/src/asf/steve/backends/elastic.py
URL: 
http://svn.apache.org/viewvc/steve/steve-web/src/asf/steve/backends/elastic.py?rev=1669944&r1=1669943&r2=1669944&view=diff
==============================================================================
--- steve/steve-web/src/asf/steve/backends/elastic.py (original)
+++ steve/steve-web/src/asf/steve/backends/elastic.py Sun Mar 29 18:01:11 2015
@@ -53,7 +53,7 @@ class ElasticStorageBackend(object):
         :param str ends: the end date of the election
         :param bool is_open: flag that indicates if election is open to the 
public or not
         """
-        election_hash = hashlib.sha512("%f-stv-%s" % (time.time(), 
os.environ['REMOTE_ADDR'] if 'REMOTE_ADDR' in os.environ else random.randint(1, 
99999999999))).hexdigest(),
+        election_hash = hashlib.sha512('%f-stv-%s' % (time.time(), 
os.environ['REMOTE_ADDR'] if 'REMOTE_ADDR' in os.environ else random.randint(1, 
99999999999))).hexdigest(),
 
         base_data = {
             'id': eid,

Modified: steve/steve-web/src/asf/steve/backends/file.py
URL: 
http://svn.apache.org/viewvc/steve/steve-web/src/asf/steve/backends/file.py?rev=1669944&r1=1669943&r2=1669944&view=diff
==============================================================================
--- steve/steve-web/src/asf/steve/backends/file.py (original)
+++ steve/steve-web/src/asf/steve/backends/file.py Sun Mar 29 18:01:11 2015
@@ -37,7 +37,7 @@ class FileBackend(object):
         :param str ends: the end date of the election
         :param bool is_open: flag that indicates if election is open to the 
public or not
         """
-        election_hash = hashlib.sha512("%f-stv-%s" % (time.time(), 
os.environ['REMOTE_ADDR'] if 'REMOTE_ADDR' in os.environ else random.randint(1, 
99999999999))).hexdigest(),
+        election_hash = hashlib.sha512('%f-stv-%s' % (time.time(), 
os.environ['REMOTE_ADDR'] if 'REMOTE_ADDR' in os.environ else random.randint(1, 
99999999999))).hexdigest(),
 
         base_data = {
             'id': eid,


Reply via email to