dabo Commit
Revision 5917
Date: 2010-07-10 09:51:15 -0700 (Sat, 10 Jul 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5917
Changed:
U trunk/dabo/dLocalize.py
U trunk/dabo/lib/__init__.py
U trunk/dabo/lib/uuid.py
Log:
Fixed a circular import dependency I created by introducing the ustr imports.
Diff:
Modified: trunk/dabo/dLocalize.py
===================================================================
--- trunk/dabo/dLocalize.py 2010-07-10 15:14:21 UTC (rev 5916)
+++ trunk/dabo/dLocalize.py 2010-07-10 16:51:15 UTC (rev 5917)
@@ -6,7 +6,6 @@
import gettext
import warnings
import dabo
-from dabo.lib.utils import ustr
_defaultLanguage, _defaultEncoding = locale.getdefaultlocale()
@@ -68,6 +67,7 @@
which would globally bind the '_' name, we'll just set the
'_currentTrans'
name to the translation object.
"""
+ from dabo.lib.utils import ustr
global _domains, _currentTrans
lang = _languageAliases.get(lang, lang)
Modified: trunk/dabo/lib/__init__.py
===================================================================
--- trunk/dabo/lib/__init__.py 2010-07-10 15:14:21 UTC (rev 5916)
+++ trunk/dabo/lib/__init__.py 2010-07-10 16:51:15 UTC (rev 5917)
@@ -9,15 +9,14 @@
import uuid
import dabo
-from dabo.lib.utils import ustr
def getRandomUUID():
- return ustr(uuid.uuid4())
+ return str(uuid.uuid4())
def getMachineUUID():
- return ustr(uuid.uuid1())
+ return str(uuid.uuid1())
try:
Modified: trunk/dabo/lib/uuid.py
===================================================================
--- trunk/dabo/lib/uuid.py 2010-07-10 15:14:21 UTC (rev 5916)
+++ trunk/dabo/lib/uuid.py 2010-07-10 16:51:15 UTC (rev 5917)
@@ -46,9 +46,7 @@
This module works with Python 2.3 or higher."""
-from dabo.lib.utils import ustr
-
__author__ = 'Ka-Ping Yee <[email protected]>'
__date__ = '$Date: 2006/06/12 23:15:40 $'.split()[1].replace('/', '-')
__version__ = '$Revision: 1.30 $'.split()[1]
@@ -181,7 +179,7 @@
return self.int
def __repr__(self):
- return 'UUID(%r)' % ustr(self)
+ return 'UUID(%r)' % str(self)
def __setattr__(self, name, value):
raise TypeError('UUID objects are immutable')
@@ -253,7 +251,7 @@
hex = property(get_hex)
def get_urn(self):
- return 'urn:uuid:' + ustr(self)
+ return 'urn:uuid:' + str(self)
urn = property(get_urn)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]