summaryrefslogtreecommitdiff
path: root/Lib/test/test_time.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_time.py')
-rw-r--r--Lib/test/test_time.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index 85ea6ee592..acc4d4106b 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -16,8 +16,11 @@ tt = time.gmtime(t)
for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I',
'j', 'm', 'M', 'p', 'S',
'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'):
- format = '%' + directive
- time.strftime(format, tt)
+ format = ' %' + directive
+ try:
+ time.strftime(format, tt)
+ except ValueError:
+ print 'conversion specifier:', format, ' failed.'
time.timezone
time.tzname