r46981 - more appdirs stuff

hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Thu, 10 Mar 2016 23:27:18 -0700 (MST)
Newsgroups gmane.comp.python.twisted.commits
Message-ID <[email protected]>
Author: hawkowl
Date: Thu Mar 10 23:27:14 2016
New Revision: 46981

Added:
   branches/manhole-hardcodedkey-8229/twisted/python/test/test_appdirs.py
Modified:
   branches/manhole-hardcodedkey-8229/twisted/python/_appdirs.py
   branches/manhole-hardcodedkey-8229/twisted/python/dist3.py

Log:
more appdirs stuff

Modified: branches/manhole-hardcodedkey-8229/twisted/python/_appdirs.py
==============================================================================
--- branches/manhole-hardcodedkey-8229/twisted/python/_appdirs.py	(original)
+++ branches/manhole-hardcodedkey-8229/twisted/python/_appdirs.py	Thu Mar 10 23:27:14 2016
@@ -14,16 +14,15 @@
 from twisted.python.reflect import qual
 
 
-def getDataDirectory(qualname=None):
+def getDataDirectory(moduleName=None):
     """
-    Get a data directory for the caller function, or C{qualname} if given.
+    Get a data directory for the caller function, or C{moduleName} if given.
 
     @returns: A directory for putting data in.
     @rtype: L{str}
     """
-    if not qualname:
+    if not moduleName:
         caller = currentframe(1)
-        qualname = ".".join([inspect.getmodule(caller).__name__,
-                             caller.f_code.co_name])
+        moduleName = inspect.getmodule(caller).__name__
 
-    return appdirs.user_data_dir(qualname)
+    return appdirs.user_data_dir(moduleName)

Modified: branches/manhole-hardcodedkey-8229/twisted/python/dist3.py
==============================================================================
--- branches/manhole-hardcodedkey-8229/twisted/python/dist3.py	(original)
+++ branches/manhole-hardcodedkey-8229/twisted/python/dist3.py	Thu Mar 10 23:27:14 2016
@@ -318,6 +318,7 @@
     "twisted.positioning.test.test_sentence",
     "twisted.protocols.test.test_basic",
     "twisted.protocols.test.test_tls",
+    "twisted.python.test.test_appdirs",
     "twisted.python.test.test_components",
     "twisted.python.test.test_constants",
     "twisted.python.test.test_deprecate",