diff MoinMoin/wikiutil.py @ 1181:a7f8dceb4410

remove types module usage
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 14 Aug 2006 00:12:34 +0200
parents 2be8ec7ba817
children 9608758dca9a
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Sun Aug 13 23:43:20 2006 +0200
+++ b/MoinMoin/wikiutil.py	Mon Aug 14 00:12:34 2006 +0200
@@ -11,7 +11,6 @@
 import os
 import re
 import time
-import types
 import urllib
 
 from MoinMoin import util, version, config
@@ -1131,7 +1130,7 @@
                 continue
             if hasattr(Parser, 'extensions'):
                 exts = Parser.extensions
-                if type(exts) == types.ListType:
+                if isinstance(exts, list):
                     for ext in Parser.extensions:
                         etp[ext] = Parser
                 elif str(exts) == '*':
@@ -1531,14 +1530,14 @@
 
 def createTicket(tm=None):
     """Create a ticket using a site-specific secret (the config)"""
-    import sha, time, types
+    import sha
     ticket = tm or "%010x" % time.time()
     digest = sha.new()
     digest.update(ticket)
 
     cfgvars = vars(config)
     for var in cfgvars.values():
-        if type(var) is types.StringType:
+        if isinstance(var, str):
             digest.update(repr(var))
 
     return "%s.%s" % (ticket, digest.hexdigest())