[Zope-Checkins] CVS: Zope/lib/python/App - Common.py:1.19

Fred L. Drake, Jr. fred@zope.com
Tue, 11 Feb 2003 13:24:25 -0500


Update of /cvs-repository/Zope/lib/python/App
In directory cvs.zope.org:/tmp/cvs-serv3318

Modified Files:
	Common.py 
Log Message:
Minor cleanups.


=== Zope/lib/python/App/Common.py 1.18 => 1.19 ===
--- Zope/lib/python/App/Common.py:1.18	Thu Jan 30 14:06:36 2003
+++ Zope/lib/python/App/Common.py	Tue Feb 11 13:24:24 2003
@@ -123,11 +123,10 @@
         r=sys.modules[__name__[:__name__.rfind('.')]].__path__[0]
     else:
         r=__name__
-    return os.path.join(os.getcwd(), r)
+    return os.path.abspath(r)
 
 
-def attrget(o,name,default):
-    if hasattr(o,name): return getattr(o,name)
-    return default
+# We really only want the 3-argument version of getattr:
+attrget = getattr
 
 def Dictionary(**kw): return kw # Sorry Guido