diff options
author | pjenvey <devnull@localhost> | 2008-03-06 02:04:41 +0000 |
---|---|---|
committer | pjenvey <devnull@localhost> | 2008-03-06 02:04:41 +0000 |
commit | c744cd6232c06f0cde764ec85c4b3464b49e3d53 (patch) | |
tree | f75f134183746522f0f2db36f6d9c7f21e4e2524 /paste/session.py | |
parent | 234b09f2faafdf6dd35d177330c61e3054bfb973 (diff) | |
download | paste-c744cd6232c06f0cde764ec85c4b3464b49e3d53.tar.gz |
avoid os.times if it's not available
Diffstat (limited to 'paste/session.py')
-rw-r--r-- | paste/session.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/paste/session.py b/paste/session.py index fdcaff2..93a1c23 100644 --- a/paste/session.py +++ b/paste/session.py @@ -133,7 +133,9 @@ class SessionFactory(object): id() is incorporated into the generation. Relies on md5 and returns a 32 character long string. """ - r = [time.time(), random.random(), os.times()] + r = [time.time(), random.random()] + if hasattr(os, 'times'): + r.append(os.times()) if for_object is not None: r.append(id(for_object)) md5_hash = md5.new(str(r)) |