mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 02:44:21 +02:00
expressions in Python function definition default values are evaluated only once, when the functions are defined
This commit is contained in:
@@ -74,7 +74,8 @@ class session(object):
|
|||||||
# a challenge, we have state="testchallenge", but live="False".
|
# a challenge, we have state="testchallenge", but live="False".
|
||||||
return sessions.hget(self.id, "state")
|
return sessions.hget(self.id, "state")
|
||||||
|
|
||||||
def create(self, timestamp=int(time.time())):
|
def create(self, timestamp=None):
|
||||||
|
if timestamp is None: timestamp = int(time.time())
|
||||||
if not self.exists():
|
if not self.exists():
|
||||||
sessions.hset(self.id, "created", timestamp)
|
sessions.hset(self.id, "created", timestamp)
|
||||||
sessions.hset(self.id, "live", True)
|
sessions.hset(self.id, "live", True)
|
||||||
|
|||||||
Reference in New Issue
Block a user