mirror of
https://github.com/certbot/certbot.git
synced 2026-01-27 19:42:53 +03: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".
|
||||
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():
|
||||
sessions.hset(self.id, "created", timestamp)
|
||||
sessions.hset(self.id, "live", True)
|
||||
|
||||
Reference in New Issue
Block a user